summaryrefslogtreecommitdiffstats
path: root/libavcodec/options.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-22 21:37:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-22 21:44:05 +0200
commit2ae91c86f3869b656b58ee3ee1f5fd2922d7b659 (patch)
treeef7dce2075137d4337fb149644768f5e82b69f98 /libavcodec/options.c
parente2e9bee2daef9d5d5169f5360737eec8b76d7e0c (diff)
downloadffmpeg-streaming-2ae91c86f3869b656b58ee3ee1f5fd2922d7b659.zip
ffmpeg-streaming-2ae91c86f3869b656b58ee3ee1f5fd2922d7b659.tar.gz
avcodec_get_context_defaults3: set codec_id
Fixes Ticket1996 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 1d10128..e1349dd 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -102,6 +102,9 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
s->av_class = &av_codec_context_class;
s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN;
+ if (codec)
+ s->codec_id = codec->id;
+
if(s->codec_type == AVMEDIA_TYPE_AUDIO)
flags= AV_OPT_FLAG_AUDIO_PARAM;
else if(s->codec_type == AVMEDIA_TYPE_VIDEO)
OpenPOWER on IntegriCloud