diff options
author | softworkz <softworkz@hotmail.com> | 2017-01-05 01:24:03 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-01-07 11:20:36 -0300 |
commit | 20e8be0c20c7b51964fa4d317073bd36b983eb55 (patch) | |
tree | 6d9e14ca31a616060ca84ecf007c89291d31c8a0 /libswscale/swscale.c | |
parent | 27627c281e66ecc43833bd62b506eb693099ff8e (diff) | |
download | ffmpeg-20e8be0c20c7b51964fa4d317073bd36b983eb55.tar.gz |
avformat/matroskaenc: Regression fix for invalid MKV headers
The following three commits created a regression by writing initially
invalid mkv headers:
650e17d88b63b5aca6e0a43483e89e64b0f7d2dd avformat/matroskaenc: write a
CRC32 element on Tags
3bcadf822711720ff0f8d14db71ae47cdf97e652 avformat/matroskaenc: write a
CRC32 element on Info
ee888cfbe777cd2916a3548c750e433ab8f8e6a5 avformat/matroskaenc: postpone
writing the Tracks master
Symptoms:
- You can no longer playback a file that is still processed by ffmpeg,
e.g. VLC fails playback
- You can no longer stream a file to a client while if is still being
processed
- Various diagnosing tools show header errors or incomplete headers
(e.g. ffprobe, mediainfo, mkvalidator)
Note: The symptoms do not apply to completed files or ffmpeg runs that
were interrupted with 'q'
Cause:
The mentioned commits made changes in a way that some header elements
are only partially written in
mkv_write_header, leaving the header in an invalid state. Only in
mkv_write_trailer, these elements
are finished correctly, but that does only occur at the end of the
process.
Regression:
Before these commits were applied, mkv headers have always been valid,
even before completion of ffmpeg.
This has worked reliably over many versions of ffmpeg, to it was an
obvious regression.
Bugtracker:
This issue has been recorded as #5977 which is resolved by this patch
Patch:
The patch adds a new function 'end_ebml_master_crc32_preliminary' that
preliminarily finishes the ebml
element without destroying the buffer. The buffer can be used to update
the ebml element later during
mkv_write_trailer. But most important: mkv_write_header finishes with a
valid mkv header again.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libswscale/swscale.c')
0 files changed, 0 insertions, 0 deletions