diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-08-26 07:42:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-08-26 07:42:25 +0000 |
commit | 922bc38d55995536e84db1b704fdccc140870d26 (patch) | |
tree | 4fc62daffb1badfa2042b0ba71271be898a2a9c5 /libavcodec | |
parent | e4eadb4b44a5bd446d2f83e92a7baeddb82448ad (diff) | |
download | ffmpeg-922bc38d55995536e84db1b704fdccc140870d26.tar.gz |
mpeg2 regression test
add mpeg2video_decoder, thats more consistant with the encoders, note, both mpeg1video and mpeg2video decoder will happily decode both mpeg1 and 2
Originally committed as revision 2166 to svn://svn.ffmpeg.org/ffmpeg/trunk
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 f6695303cf..bd544f7d92 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 5a158096d2..febb80b23b 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 a2a1bbd7ac..d65ad86f21 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; |