Mercurial > libavcodec.hg
changeset 1423:2e590fee59bd libavcodec
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
author | michaelni |
---|---|
date | Tue, 26 Aug 2003 07:42:25 +0000 |
parents | efeed6e29f9b |
children | 39ebefd82728 |
files | allcodecs.c avcodec.h mpeg12.c |
diffstat | 3 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/allcodecs.c Mon Aug 25 22:54:53 2003 +0000 +++ b/allcodecs.c Tue Aug 26 07:42:25 2003 +0000 @@ -96,7 +96,8 @@ 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
--- a/avcodec.h Mon Aug 25 22:54:53 2003 +0000 +++ b/avcodec.h Tue Aug 26 07:42:25 2003 +0000 @@ -1309,7 +1309,8 @@ 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;
--- a/mpeg12.c Mon Aug 25 22:54:53 2003 +0000 +++ b/mpeg12.c Tue Aug 26 07:42:25 2003 +0000 @@ -2496,8 +2496,8 @@ return 0; } -AVCodec mpeg_decoder = { - "mpegvideo", +AVCodec mpeg1video_decoder = { + "mpeg1video", CODEC_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, sizeof(Mpeg1Context), @@ -2509,6 +2509,19 @@ .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;