mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Check if hcodec_id is set before using it. Occurs with e.g. RealVideo.
This commit is contained in:
parent
d1896791cb
commit
905b53dc14
@ -1,3 +1,8 @@
|
||||
2004-01-02 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: Segfault when muxing some video formats due
|
||||
to unchecked data (includes RealVideo).
|
||||
|
||||
2004-01-01 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* Released v0.8.0.
|
||||
|
@ -73,7 +73,8 @@ void video_packetizer_c::set_headers() {
|
||||
!strncasecmp(fourcc, "XVID", 4) ||
|
||||
!strncasecmp(fourcc, "DX5", 3))
|
||||
is_mpeg4 = true;
|
||||
} else if (!strncmp(hcodec_id, MKV_V_MPEG4_SP, strlen(MKV_V_MPEG4_SP) - 2))
|
||||
} else if ((hcodec_id != NULL) &&
|
||||
!strncmp(hcodec_id, MKV_V_MPEG4_SP, strlen(MKV_V_MPEG4_SP) - 2))
|
||||
is_mpeg4 = true;
|
||||
|
||||
if (codec_id != NULL)
|
||||
@ -86,7 +87,7 @@ void video_packetizer_c::set_headers() {
|
||||
} else
|
||||
set_codec_id(MKV_V_MSCOMP);
|
||||
if ((!is_mpeg4 || !hack_engaged(ENGAGE_NATIVE_BFRAMES)) &&
|
||||
!strcmp(hcodec_id, MKV_V_MSCOMP) &&
|
||||
(hcodec_id != NULL) && !strcmp(hcodec_id, MKV_V_MSCOMP) &&
|
||||
(ti->private_data != NULL) &&
|
||||
(ti->private_size >= sizeof(alBITMAPINFOHEADER)) &&
|
||||
(ti->fourcc[0] != 0))
|
||||
|
Loading…
Reference in New Issue
Block a user