[FFmpeg-devel] [RFC] Abort in av_find_stream_info if decoding is needed and the decoder isn't found
Martin Storsjö
martin
Wed Jan 27 09:39:39 CET 2010
Hi,
If trying to open a realtime network stream which hasn't got any matching
decoder available, the av_find_stream_info call may block for a very long
time. (max_analyze_duration doesn't come into effect if pkt->duration
isn't set.)
If has_codec_parameters indicates that the stream needs decoding, but
try_decode_frame fails due to not being able to open the decoder, we could
abort immediately, since we will never be able to open that decoder. (See
the attached patch.)
Is this a sensible thing to add? Or are there cases where codec_id could
change during av_find_stream_info, so we shouldn't bail out immediately
even if we can't find a decoder for the current codec_id?
// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: try_decode_failure.patch
Type: text/x-diff
Size: 1157 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100127/ff9d765d/attachment.patch>
More information about the ffmpeg-devel
mailing list