You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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:
@@ -144,7 +144,7 @@ read_header:
|
|||||||
av_frame_move_ref(rframe, s->picture_ptr);
|
av_frame_move_ref(rframe, s->picture_ptr);
|
||||||
s->got_picture = 0;
|
s->got_picture = 0;
|
||||||
if (avctx->skip_frame == AVDISCARD_ALL)
|
if (avctx->skip_frame == AVDISCARD_ALL)
|
||||||
return AVERROR(EAGAIN);
|
return buf_size;
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
|
|
||||||
if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
|
if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
|
||||||
|
Reference in New Issue
Block a user