mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/av1_frame_merge_bsf: Passthrough pos in case of no timestamps
This is needed by the AV1-Annex B and AV1-OBU demuxers. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
172116fd5d
commit
5a3385d49a
@ -103,10 +103,15 @@ eof:
|
|||||||
err = AVERROR(EAGAIN);
|
err = AVERROR(EAGAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buffer packets with timestamps. There should be at most one per TU, be it split or not.
|
/* Buffer packets with timestamps (there should be at most one per TU)
|
||||||
if (!buffer_pkt->data && in->pts != AV_NOPTS_VALUE)
|
* or any packet if buffer_pkt is empty. The latter is needed to
|
||||||
|
* passthrough positions in case there are no timestamps like with
|
||||||
|
* the raw OBU demuxer. */
|
||||||
|
if (!buffer_pkt->data ||
|
||||||
|
in->pts != AV_NOPTS_VALUE && buffer_pkt->pts == AV_NOPTS_VALUE) {
|
||||||
|
av_packet_unref(buffer_pkt);
|
||||||
av_packet_move_ref(buffer_pkt, in);
|
av_packet_move_ref(buffer_pkt, in);
|
||||||
else
|
} else
|
||||||
av_packet_unref(in);
|
av_packet_unref(in);
|
||||||
|
|
||||||
ff_cbs_fragment_reset(&ctx->frag[ctx->idx]);
|
ff_cbs_fragment_reset(&ctx->frag[ctx->idx]);
|
||||||
|
Loading…
Reference in New Issue
Block a user