]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegvideo_parser.c
More complete documentation for AVFrame.reference.
[ffmpeg] / libavcodec / mpegvideo_parser.c
index afc509281ddeda573461374f33ce16f860e3557d..a7ce09d4c3c07e7582c2d70b39874014a76297b0 100644 (file)
@@ -102,11 +102,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
                                 s->repeat_pict = 1;
                             }
                         }
-
-                        /* the packet only represents half a frame
-                           XXX,FIXME maybe find a different solution */
-                        if(picture_structure != 3)
-                            s->repeat_pict = -1;
                     }
                     break;
                 }
@@ -128,7 +123,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
 
 static int mpegvideo_parse(AVCodecParserContext *s,
                            AVCodecContext *avctx,
-                           uint8_t **poutbuf, int *poutbuf_size,
+                           const uint8_t **poutbuf, int *poutbuf_size,
                            const uint8_t *buf, int buf_size)
 {
     ParseContext1 *pc1 = s->priv_data;
@@ -140,7 +135,7 @@ static int mpegvideo_parse(AVCodecParserContext *s,
     }else{
         next= ff_mpeg1_find_frame_end(pc, buf, buf_size);
 
-        if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
+        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
             *poutbuf = NULL;
             *poutbuf_size = 0;
             return buf_size;
@@ -156,7 +151,7 @@ static int mpegvideo_parse(AVCodecParserContext *s,
            s->pict_type, (double)avctx->time_base.den / avctx->time_base.num, s->repeat_pict);
 #endif
 
-    *poutbuf = (uint8_t *)buf;
+    *poutbuf = buf;
     *poutbuf_size = buf_size;
     return next;
 }