[FFmpeg-trac] #8578(avformat:new): FFmpeg 4.2 breaks Matroska streaming
FFmpeg
trac at avcodec.org
Sun Mar 22 23:40:09 EET 2020
#8578: FFmpeg 4.2 breaks Matroska streaming
-------------------------------------+-------------------------------------
Reporter: Sesse | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: mkv | Blocked By:
regression |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Sesse):
Martin Storsjö helped me debug this. The gist of it is: Earlier, there
would be only one write callback per chunk. Now, there is two; one for the
EBML ID (4 bytes) and one for the actual data (50–60 kB). Since the
Matroska muxer doesn't use data markers (type in the callback, after the
header has been written, is always AVIO_DATA_MARKER_UNKNOWN), my code
assumes that the point right after the EBML ID is a valid starting point
for the stream, whereas it isn't.
Worse yet, since there's a sizeable delay in wall clock time after the
EBML ID is written, it's practically guaranteed that the client will
indeed hit that point. If I add a hack to my code saying that
{{{
if (buf_size == 4) type = AVIO_DATA_MARKER_SYNC_POINT;
}}}
then things instantly start working again.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8578#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list