Theora signals "Output last frame again" with an empty packet. Finishes fixing ticket #11451.
Signed-off-by: James Almer <jamr...@gmail.com> --- libavformat/demux.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index d8ab29431e..0e39346f62 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1173,7 +1173,15 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, 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); + compute_pkt_fields(s, st, sti->parser, pkt, pkt->dts, pkt->pts); + + // Theora has valid 0-sized packets that need to be output + if (st->codecpar->codec_id == AV_CODEC_ID_THEORA) { + ret = avpriv_packet_list_put(&fci->parse_queue, + pkt, NULL, 0); + if (ret < 0) + goto fail; + } } while (size > 0 || (flush && got_output)) { -- 2.48.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".