]> git.sesse.net Git - mlt/commitdiff
consumer_avformat.c: bugfix (2106941) compilation against recent ffmpeg changes
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 12 Sep 2008 16:51:29 +0000 (16:51 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 12 Sep 2008 16:51:29 +0000 (16:51 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1181 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/consumer_avformat.c

index 5fb963cbafffe0c0977c8827469bcbc411e3bf2e..fbe91e89e020c8d354fca84e961e0fccac14e85a 100644 (file)
@@ -799,13 +799,7 @@ static void *consumer_thread( void *arg )
        // Check for audio codec overides
        if ( acodec != NULL )
        {
-               AVCodec *p = first_avcodec;
-               while( p != NULL ) 
-               {
-                       if ( !strcmp( p->name, acodec ) && p->type == CODEC_TYPE_AUDIO )
-                               break;
-                       p = p->next;
-               }
+               AVCodec *p = avcodec_find_encoder_by_name( acodec );
                if ( p != NULL )
                        audio_codec_id = p->id;
                else
@@ -815,13 +809,7 @@ static void *consumer_thread( void *arg )
        // Check for video codec overides
        if ( vcodec != NULL )
        {
-               AVCodec *p = first_avcodec;
-               while( p != NULL ) 
-               {
-                       if ( !strcmp( p->name, vcodec ) && p->type == CODEC_TYPE_VIDEO )
-                               break;
-                       p = p->next;
-               }
+               AVCodec *p = avcodec_find_encoder_by_name( vcodec );
                if ( p != NULL )
                        video_codec_id = p->id;
                else