Theora signals "Output last frame again" with an empty packet. Finishes fixing ticket #11451.
Signed-off-by: James Almer <[email protected]> --- libavformat/demux.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index d8ab29431e..407e448252 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1172,8 +1172,14 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int ret = 0, got_output = flush; if (!size && !flush && sti->parser->flags & PARSER_FLAG_COMPLETE_FRAMES) { - // preserve 0-size sync packets - compute_pkt_fields(s, st, sti->parser, pkt, AV_NOPTS_VALUE, AV_NOPTS_VALUE); + if (st->codecpar->codec_id == AV_CODEC_ID_THEORA) { + compute_pkt_fields(s, st, sti->parser, pkt, pkt->dts, pkt->pts); + ret = avpriv_packet_list_put(&fci->parse_queue, + pkt, NULL, 0); + if (ret < 0) + goto fail; + } else // preserve 0-size sync packets + compute_pkt_fields(s, st, sti->parser, pkt, AV_NOPTS_VALUE, AV_NOPTS_VALUE); } while (size > 0 || (flush && got_output)) { -- 2.48.1 _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
