diff options
author | Muhammad Faiz <mfcc64@gmail.com> | 2017-04-28 17:19:13 +0700 |
---|---|---|
committer | Muhammad Faiz <mfcc64@gmail.com> | 2017-04-30 05:48:21 +0700 |
commit | d535e0c14004a15bb38ea288fa9a4f2e27d26f6b (patch) | |
tree | ef4a714e4d1bdd2ec9839eb36a79e96290756ebf /libavcodec/internal.h | |
parent | 399c7ab9c6bc9e683c5a60b34d50290ae563e2f1 (diff) | |
download | ffmpeg-d535e0c14004a15bb38ea288fa9a4f2e27d26f6b.tar.gz |
avcodec/pthread_frame, decode: allow errors to happen on draining
So, all frames and errors are correctly reported in order.
Also limit the numbers of error during draining to prevent infinite loop.
This fix fate failure with THREADS>=4:
make fate-h264-attachment-631 THREADS=4
This also reverts a755b725ec1d657609c8bd726ce37e7cf193d03f.
Suggested-by: wm4, Ronald S. Bultje, Marton Balint
Reviewed-by: w4 <nfxjfg@googlemail.com>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 84d3362f39..caa46dcb92 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -200,6 +200,9 @@ typedef struct AVCodecInternal { int showed_multi_packet_warning; int skip_samples_multiplier; + + /* to prevent infinite loop on errors when draining */ + int nb_draining_errors; } AVCodecInternal; struct AVCodecDefault { |