Commit d401ba6b authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/matroskaenc: Force the minimum value for -reserve_index_space to 2.

Fixes an assertion failure:
Assertion size >= 2 failed at libavformat/matroskaenc.c:298
parent 81d1e1e5
...@@ -2001,6 +2001,8 @@ static int mkv_write_header(AVFormatContext *s) ...@@ -2001,6 +2001,8 @@ static int mkv_write_header(AVFormatContext *s)
} }
if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && mkv->reserve_cues_space) { if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && mkv->reserve_cues_space) {
mkv->cues_pos = avio_tell(pb); mkv->cues_pos = avio_tell(pb);
if (mkv->reserve_cues_space == 1)
mkv->reserve_cues_space++;
put_ebml_void(pb, mkv->reserve_cues_space); put_ebml_void(pb, mkv->reserve_cues_space);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment