#9843 closed defect (fixed)
Matroska muxer never returns avio markers
Reported by: | Sesse | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mkv |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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@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@stupeflix.com>
However, it didn't take into account that this patch was already in the tree:
commit bda5b6627a558cf10c4d09eeff264289a1370cc1
Author: Aaron Colwell <acolwell@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@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.
Change History (3)
comment:1 by , 2 years ago
Keywords: | mkv added |
---|
comment:2 by , 16 months ago
comment:3 by , 16 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
See 69c308a6d1f6027bc3328cd8f4d38fb516ee10b8
After many years: #5600
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20230828170308.119613-1-steinar+ffmpeg@gunderson.no/