diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-06-30 21:09:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-23 01:36:59 +0200 |
commit | 7f84858dcf49bc747805b247151b96de7606555a (patch) | |
tree | 36c8748dc28b873bde1d8fa9ffc159ea8517549a | |
parent | 32df1cd6ac09bc52d5a4cadf4053aeb113472f8d (diff) | |
download | ffmpeg-7f84858dcf49bc747805b247151b96de7606555a.tar.gz |
ffmpeg: only count got_output/errors in decode_error_stat
If threading is used, the first (thread_count - 1) packets are read
before any frame/error is returned. Counting this as successful decoding
is wrong, because it also happens when no single frame could be decoded.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit bd0f14123fd8c7ff1c27b726d143f84c67f3a522)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 70b97a89d2d7ba837c830b1da5924314d68fc3e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1841,7 +1841,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) ret = AVERROR_INVALIDDATA; } - if (*got_output || ret<0 || pkt->size) + if (*got_output || ret<0) decode_error_stat[ret<0] ++; if (ret < 0 && exit_on_error) @@ -1989,7 +1989,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) ); } - if (*got_output || ret<0 || pkt->size) + if (*got_output || ret<0) decode_error_stat[ret<0] ++; if (ret < 0 && exit_on_error) @@ -2110,7 +2110,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output) int i, ret = avcodec_decode_subtitle2(ist->dec_ctx, &subtitle, got_output, pkt); - if (*got_output || ret<0 || pkt->size) + if (*got_output || ret<0) decode_error_stat[ret<0] ++; if (ret < 0 && exit_on_error) |