mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 09:52:17 +00:00
lavc/encode: set frame_number for encoders using receive_packet()
It is currently set in encode_simple_internal(), which is only called for encoders using the "simple" encoding API.
This commit is contained in:
parent
67aceaf4ad
commit
b780b6db64
@ -247,11 +247,8 @@ end:
|
|||||||
if (ret < 0 || !got_packet)
|
if (ret < 0 || !got_packet)
|
||||||
av_packet_unref(avpkt);
|
av_packet_unref(avpkt);
|
||||||
|
|
||||||
if (frame) {
|
if (frame)
|
||||||
if (!ret)
|
|
||||||
avctx->frame_number++;
|
|
||||||
av_frame_unref(frame);
|
av_frame_unref(frame);
|
||||||
}
|
|
||||||
|
|
||||||
if (got_packet)
|
if (got_packet)
|
||||||
// Encoders must always return ref-counted buffers.
|
// Encoders must always return ref-counted buffers.
|
||||||
@ -383,6 +380,8 @@ int attribute_align_arg avcodec_send_frame(AVCodecContext *avctx, const AVFrame
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
avctx->frame_number++;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user