[FFmpeg-trac] #9843(avformat:new): Matroska muxer never returns avio markers
FFmpeg
trac at avcodec.org
Tue Jul 26 00:19:50 EEST 2022
#9843: Matroska muxer never returns avio markers
----------------------------------+--------------------------------------
Reporter: Sesse | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
The Matroska/WebM muxer has this code to send avio markers on sync points:
if (!mkv->cluster_pos)
avio_write_marker(s->pb,
av_rescale_q(pkt->dts,
s->streams[pkt->stream_index]->time_base, AV_TIME_BASE_Q),
keyframe && (mkv->have_video ? codec_type ==
AVMEDIA_TYPE_VIDEO : 1) ? AVIO_DATA_MARKER_SYNC_POINT :
AVIO_DATA_MARKER_BOUNDARY_POINT);
This was merged into FFmpeg in
commit dc62016c4b77a48284b24ad927eb68035b133925
Merge: a86fe0d738 71852a1ba8
Author: Matthieu Bouron <matthieu.bouron at stupeflix.com>
Date: Thu Jun 23 17:57:34 2016 +0200
Merge commit '71852a1ba89abc8749e309d9d662c49d47e19531'
* commit '71852a1ba89abc8749e309d9d662c49d47e19531':
matroskaenc: Provide output bytestream markers
Merged-by: Matthieu Bouron <matthieu.bouron at stupeflix.com>
However, it didn't take into account that this patch was already in the
tree:
commit bda5b6627a558cf10c4d09eeff264289a1370cc1
Author: Aaron Colwell <acolwell at chromium.org>
Date: Wed Mar 14 21:40:29 2012 +0100
matroskaenc: change cluster_pos to use -1 as the "I'm not currently
working on a cluster" signal instead of 0.
This avoids problems
where avio_tell() returns 0. I've updated all the checks against
cluster_pos
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
So now mkv->cluster_pos cannot be 0, and the markers are never sent. It
seems this functionality has been broken in FFmpeg since it was merged.
Changing the test to (mkv->cluster_pos == -1) instead seems to fix the
issue, but someone should verify that this was indeed the intention.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9843>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list