changeset 1615:721a76648a4b libavcodec

mpegvideo is back
author iive
date Wed, 12 Nov 2003 01:19:36 +0000
parents 6c82ef97d3e6
children 13a20c0594f2
files allcodecs.c avcodec.h mpeg12.c
diffstat 3 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/allcodecs.c	Mon Nov 10 18:33:58 2003 +0000
+++ b/allcodecs.c	Wed Nov 12 01:19:36 2003 +0000
@@ -102,6 +102,7 @@
 #endif
     register_avcodec(&mpeg1video_decoder);
     register_avcodec(&mpeg2video_decoder);
+    register_avcodec(&mpegvideo_decoder);
 #ifdef HAVE_XVMC
     register_avcodec(&mpeg_xvmc_decoder);
 #endif
--- a/avcodec.h	Mon Nov 10 18:33:58 2003 +0000
+++ b/avcodec.h	Wed Nov 12 01:19:36 2003 +0000
@@ -1523,6 +1523,7 @@
 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;
--- a/mpeg12.c	Mon Nov 10 18:33:58 2003 +0000
+++ b/mpeg12.c	Wed Nov 12 01:19:36 2003 +0000
@@ -2655,6 +2655,20 @@
     .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;