From c512b303c29c3ed20eddb1f61bc0418de6632891 Mon Sep 17 00:00:00 2001 From: Ivan Kalvachev Date: Wed, 12 Nov 2003 01:19:36 +0000 Subject: [PATCH] mpegvideo is back Originally committed as revision 2507 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h | 1 + libavcodec/mpeg12.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 46cd560904..f57ff0b509 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -102,6 +102,7 @@ void avcodec_register_all(void) #endif register_avcodec(&mpeg1video_decoder); register_avcodec(&mpeg2video_decoder); + register_avcodec(&mpegvideo_decoder); #ifdef HAVE_XVMC register_avcodec(&mpeg_xvmc_decoder); #endif diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 6bcb3111da..c8f8260591 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1523,6 +1523,7 @@ extern AVCodec wmv1_decoder; extern AVCodec wmv2_decoder; extern AVCodec mpeg1video_decoder; extern AVCodec mpeg2video_decoder; +extern AVCodec mpegvideo_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 e1f693e1da..7dfad6fed8 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -2655,6 +2655,20 @@ AVCodec mpeg2video_decoder = { .flush= ff_mpeg_flush, }; +//legacy decoder +AVCodec mpegvideo_decoder = { + "mpegvideo", + 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;