mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mjpegbdec: return the amount of bytes consumed when discarding frames
EAGAIN is not correct in this scenario. FFCodec.cb.decode() callback decoders always return the amount of bytes consumed from the input packet (if any), and report if a frame was generated by setting got_frame. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
5b342d0005
commit
64007595dc
|
@ -144,7 +144,7 @@ read_header:
|
|||
av_frame_move_ref(rframe, s->picture_ptr);
|
||||
s->got_picture = 0;
|
||||
if (avctx->skip_frame == AVDISCARD_ALL)
|
||||
return AVERROR(EAGAIN);
|
||||
return buf_size;
|
||||
*got_frame = 1;
|
||||
|
||||
if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
|
||||
|
|
Loading…
Reference in New Issue