diff options
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/allcodecs.c | 3 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 3 | ||||
-rw-r--r-- | libavcodec/mpeg12.c | 17 |
3 files changed, 19 insertions, 4 deletions
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index f669530..bd544f7 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -96,7 +96,8 @@ void avcodec_register_all(void) register_avcodec(&mpeg4aac_decoder); #endif #endif - register_avcodec(&mpeg_decoder); + register_avcodec(&mpeg1video_decoder); + register_avcodec(&mpeg2video_decoder); #ifdef HAVE_XVMC register_avcodec(&mpeg_xvmc_decoder); #endif diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 5a15809..febb80b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1309,7 +1309,8 @@ extern AVCodec msmpeg4v2_decoder; extern AVCodec msmpeg4v3_decoder; extern AVCodec wmv1_decoder; extern AVCodec wmv2_decoder; -extern AVCodec mpeg_decoder; +extern AVCodec mpeg1video_decoder; +extern AVCodec mpeg2video_decoder; extern AVCodec mpeg_xvmc_decoder; extern AVCodec h263i_decoder; extern AVCodec flv_decoder; diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index a2a1bbd..d65ad86 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -2496,8 +2496,8 @@ static int mpeg_decode_end(AVCodecContext *avctx) return 0; } -AVCodec mpeg_decoder = { - "mpegvideo", +AVCodec mpeg1video_decoder = { + "mpeg1video", CODEC_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, sizeof(Mpeg1Context), @@ -2509,6 +2509,19 @@ AVCodec mpeg_decoder = { .flush= ff_mpeg_flush, }; +AVCodec mpeg2video_decoder = { + "mpeg2video", + CODEC_TYPE_VIDEO, + CODEC_ID_MPEG2VIDEO, + sizeof(Mpeg1Context), + mpeg_decode_init, + NULL, + mpeg_decode_end, + mpeg_decode_frame, + CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED, + .flush= ff_mpeg_flush, +}; + #ifdef HAVE_XVMC static int mpeg_mc_decode_init(AVCodecContext *avctx){ Mpeg1Context *s; |