diff options
author | jstebbins <[email protected]> | 2011-01-02 20:35:30 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-01-02 20:35:30 +0000 |
commit | 25d1c7b528d88c8c80bb6a99c9d75120a55c80e1 (patch) | |
tree | 971044a5859dd3c2bce7755790c5369128a1d08e /libhb/stream.c | |
parent | 479d97982ebe32223edb9064662dd27e4641fe08 (diff) |
fix a problem reading flv files that have null packets
ffmpeg will return error code EAGAIN for these packets. we were terminating
when seeing this error code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3724 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r-- | libhb/stream.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index 32d407735..7d9b016cc 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -3432,6 +3432,12 @@ static int ffmpeg_read( hb_stream_t *stream, hb_buffer_t *buf ) again: if ( ( err = av_read_frame( stream->ffmpeg_ic, stream->ffmpeg_pkt )) < 0 ) { + // av_read_frame can return EAGAIN. In this case, it expects + // to be called again to get more data. + if ( err == AVERROR(EAGAIN) ) + { + goto again; + } // XXX the following conditional is to handle avi files that // use M$ 'packed b-frames' and occasionally have negative // sizes for the null frames these require. |