You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/binkaudio: clear pts when returning more than one frame per input packet
This will be needed for a following commit, after which ff_get_buffer() will stop setting frame->pts to AV_NOPTS_VALUE. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -296,9 +296,10 @@ static int binkaudio_receive_frame(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
{
|
{
|
||||||
BinkAudioContext *s = avctx->priv_data;
|
BinkAudioContext *s = avctx->priv_data;
|
||||||
GetBitContext *gb = &s->gb;
|
GetBitContext *gb = &s->gb;
|
||||||
int ret;
|
int new_pkt, ret;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
|
new_pkt = !s->pkt->data;
|
||||||
if (!s->pkt->data) {
|
if (!s->pkt->data) {
|
||||||
ret = ff_decode_get_packet(avctx, s->pkt);
|
ret = ff_decode_get_packet(avctx, s->pkt);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@@ -325,6 +326,8 @@ again:
|
|||||||
frame->nb_samples = s->frame_len;
|
frame->nb_samples = s->frame_len;
|
||||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
if (!new_pkt)
|
||||||
|
frame->pts = AV_NOPTS_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decode_block(s, (float **)frame->extended_data,
|
if (decode_block(s, (float **)frame->extended_data,
|
||||||
|
Reference in New Issue
Block a user