diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-08-18 17:09:34 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-08-18 17:09:34 +0000 |
commit | 3f3fe38d254ca5b4823a2c76d06011087f707200 (patch) | |
tree | c50f6688406c07d0aba16e65ec218ea3733d8df3 /ffplay.c | |
parent | fc7ed9a6f60860fb19c54ae2482a0588ca8054f6 (diff) | |
download | ffmpeg-3f3fe38d254ca5b4823a2c76d06011087f707200.tar.gz |
Set AVStream.discard, so that demuxers can choose which stream to select if that is a serverside option (as is the case for RTSP). See "Realmedia patch" thread on mailinglist.
Originally committed as revision 14825 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1773,6 +1773,7 @@ static int stream_component_open(VideoState *is, int stream_index) if(thread_count>1) avcodec_thread_init(enc, thread_count); enc->thread_count= thread_count; + ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; switch(enc->codec_type) { case CODEC_TYPE_AUDIO: is->audio_stream = stream_index; @@ -1869,6 +1870,7 @@ static void stream_component_close(VideoState *is, int stream_index) break; } + ic->streams[stream_index]->discard = AVDISCARD_ALL; avcodec_close(enc); switch(enc->codec_type) { case CODEC_TYPE_AUDIO: @@ -1979,6 +1981,7 @@ static int decode_thread(void *arg) for(i = 0; i < ic->nb_streams; i++) { AVCodecContext *enc = ic->streams[i]->codec; + ic->streams[i]->discard = AVDISCARD_ALL; switch(enc->codec_type) { case CODEC_TYPE_AUDIO: if ((audio_index < 0 || wanted_audio_stream-- > 0) && !audio_disable) |