mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +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)
|
||||
av_packet_unref(avpkt);
|
||||
|
||||
if (frame) {
|
||||
if (!ret)
|
||||
avctx->frame_number++;
|
||||
if (frame)
|
||||
av_frame_unref(frame);
|
||||
}
|
||||
|
||||
if (got_packet)
|
||||
// Encoders must always return ref-counted buffers.
|
||||
@ -383,6 +380,8 @@ int attribute_align_arg avcodec_send_frame(AVCodecContext *avctx, const AVFrame
|
||||
return ret;
|
||||
}
|
||||
|
||||
avctx->frame_number++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user