[vlc-commits] avcodec: do not overwrite libavcodec internal AVCodec data

Rémi Denis-Courmont git at videolan.org
Thu Sep 11 22:38:35 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 11 23:15:40 2014 +0300| [023fab67dd5608c56596437bd9c0bd6d021deb4f] | committer: Rémi Denis-Courmont

avcodec: do not overwrite libavcodec internal AVCodec data

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=023fab67dd5608c56596437bd9c0bd6d021deb4f
---

 modules/codec/avcodec/audio.c    |    1 -
 modules/codec/avcodec/subtitle.c |    1 -
 modules/codec/avcodec/video.c    |    1 -
 3 files changed, 3 deletions(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index daa9a2c..ee582b5 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -246,7 +246,6 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
         return VLC_ENOMEM;
     }
 
-    p_codec->type = AVMEDIA_TYPE_AUDIO;
     p_context->codec_type = AVMEDIA_TYPE_AUDIO;
     p_context->codec_id = i_codec_id;
 #if (LIBAVCODEC_VERSION_MAJOR >= 55)
diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
index 4389947..b5bd1dd 100644
--- a/modules/codec/avcodec/subtitle.c
+++ b/modules/codec/avcodec/subtitle.c
@@ -70,7 +70,6 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
     if (!sys)
         return VLC_ENOMEM;
 
-    codec->type = AVMEDIA_TYPE_SUBTITLE;
     context->codec_type = AVMEDIA_TYPE_SUBTITLE;
     context->codec_id = codec_id;
     sys->p_context = context;
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 1234da8..7661069 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -267,7 +267,6 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     if( ( p_dec->p_sys = p_sys = calloc( 1, sizeof(decoder_sys_t) ) ) == NULL )
         return VLC_ENOMEM;
 
-    p_codec->type = AVMEDIA_TYPE_VIDEO;
     p_context->codec_type = AVMEDIA_TYPE_VIDEO;
     p_context->codec_id = i_codec_id;
     p_sys->p_context = p_context;



More information about the vlc-commits mailing list