[vlc-commits] avcodec: remove no-op

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:37:08 2014 +0300| [b93941118c323e0b7898a2faa37f9e22001f1654] | committer: Rémi Denis-Courmont

avcodec: remove no-op

This is already taken care of by avcodec_open2().

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

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

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 61f89fa..71e9f30 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -246,8 +246,6 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
         return VLC_ENOMEM;
     }
 
-    p_context->codec_type = AVMEDIA_TYPE_AUDIO;
-    p_context->codec_id = p_codec->id;
 #if (LIBAVCODEC_VERSION_MAJOR >= 55)
     p_context->refcounted_frames = true;
 #else
diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
index 7d103e2..e416164 100644
--- a/modules/codec/avcodec/subtitle.c
+++ b/modules/codec/avcodec/subtitle.c
@@ -70,8 +70,6 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
     if (!sys)
         return VLC_ENOMEM;
 
-    context->codec_type = AVMEDIA_TYPE_SUBTITLE;
-    context->codec_id = codec->id;
     sys->p_context = context;
     sys->p_codec = codec;
     sys->b_delayed_open = false;
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b1a2b03..2e05979 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -267,8 +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_context->codec_type = AVMEDIA_TYPE_VIDEO;
-    p_context->codec_id = p_codec->id;
     p_sys->p_context = p_context;
     p_sys->p_codec = p_codec;
     p_sys->p_ff_pic = avcodec_alloc_frame();



More information about the vlc-commits mailing list