]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegvideo_parser.c
Proper check for --help and -h parameters
[ffmpeg] / libavcodec / mpegvideo_parser.c
index a015b1617c5323144a364831b30704cc32eebec8..8beaeb41ab5971e600e8757ee1370c93396c7bc4 100644 (file)
@@ -128,7 +128,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;
@@ -138,9 +138,9 @@ static int mpegvideo_parse(AVCodecParserContext *s,
     if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
         next= buf_size;
     }else{
-        next= mpeg1_find_frame_end(pc, buf, buf_size);
+        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 +156,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;
 }