Hi,
the attached patch should fix this bug.

-- 
Anton Khirnov
Index: lynkeos.app-1.2/Sources/ffmpeg_access.c
===================================================================
--- lynkeos.app-1.2.orig/Sources/ffmpeg_access.c	2014-03-01 01:07:40.000000000 +0000
+++ lynkeos.app-1.2/Sources/ffmpeg_access.c	2014-03-01 01:09:20.083727865 +0000
@@ -129,7 +129,7 @@
                 av_free_packet(&packet);
 
             // Read new packet
-            if(av_read_packet(pFormatCtx, &packet)<0)
+            if(av_read_frame(pFormatCtx, &packet)<0)
                 goto loop_exit;
         } while(packet.stream_index!=videoStream);
     }
@@ -198,7 +198,7 @@
 
   ffmpegLoadMovie((movie->pFormatCtx->filename),&newMovie);
 
-  av_close_input_file(movie->pFormatCtx);
+  avformat_close_input(&movie->pFormatCtx);
   avcodec_close(movie->pCodecCtx);
   av_free(((AVPicture *)(movie->pConvertedFrame))->data[0]);
   av_free(movie->pCurrentFrame);
@@ -243,7 +243,7 @@
     if(avformat_find_stream_info(pFormatCtx, NULL)<0){
       printf("ERROR: Could not retrieve stream operation");
       printf("\n");
-      av_close_input_file(pFormatCtx);
+      avformat_close_input(&pFormatCtx);
       //return -1; // Couldn't find stream information
       ffmpegSetLastErrorOccured("Couldn't find stream information.",-1);
       return _ffmpegErrorOccuredFlag;
@@ -264,7 +264,7 @@
     if(videoStream==-1){
       printf("ERROR: I didn't find a video stream");
       printf("\n");
-      av_close_input_file(pFormatCtx);
+      avformat_close_input(&pFormatCtx);
       ffmpegSetLastErrorOccured("Didn't find a video stream.",-1);
       //return -1; // Didn't find a video stream
       return _ffmpegErrorOccuredFlag;
@@ -278,7 +278,7 @@
     if(pCodec==NULL){
       printf("ERROR: Codec not found");
       printf("\n");
-      av_close_input_file(pFormatCtx);
+      avformat_close_input(&pFormatCtx);
       //return -1; // Codec not found
       ffmpegSetLastErrorOccured("Codec not found.",-1);
       return _ffmpegErrorOccuredFlag;
@@ -294,7 +294,7 @@
     if(avcodec_open2(pCodecCtx, pCodec, NULL)<0){
       printf("ERROR: Can't open the codec");
       printf("\n");
-      av_close_input_file(pFormatCtx);
+      avformat_close_input(&pFormatCtx);
       //return -1; // Could not open codec
       ffmpegSetLastErrorOccured("Could not open codec.",-1);
       return _ffmpegErrorOccuredFlag;

Reply via email to