[FFmpeg-devel] [PATCH] examples/demuxing_decoding return value error

Even Wiik Thomassen e.thomassen at sportradar.com
Thu Dec 12 17:12:13 CET 2013


I've attached a trivial patch to fix a bug in the demuxing_decoding example.

Now the open_codec_context function will return -1 to signal an error if it
fails to find a codec.

Before it would return the stream index, which was always >= 0. The two
places where the function was called checked if the return value was < 0
to check if there was an error, and would therefor not notice when a codec
was not found.

This change make it fail faster, instead of repeated failed tries to decode
frames with no codec.


Please review,
-- 
Even Wiik Thomassen
e.thomassen at sportradar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-examples-demuxing_decoding-Return-error-when-no-code.patch
Type: text/x-patch
Size: 1234 bytes
Desc: 0001-examples-demuxing_decoding-Return-error-when-no-code.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131212/0416e109/attachment.bin>


More information about the ffmpeg-devel mailing list