From 3a6a29c1d5ebeb36c9961592c4f7e0c347a89638 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 13 Dec 2008 22:14:16 +0000 Subject: [PATCH] Revision 3884 removed the variable i from the loop end condition causing segfaults if "--engage native_mpeg4" is used together with MPEG-4 part 2 video. Fix for bug 318. --- ChangeLog | 5 +++++ src/output/p_video.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 227f7f80f..da17c88fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-13 Moritz Bunkus + + * mkvmerge: bug fix: Fixed a crash (segfault) with MPEG-4 part 2 + video if "--engage native_mpeg4" is used. Fix for bug 318. + 2008-12-08 Moritz Bunkus * Windows installer: The installer cleans up leftovers from old diff --git a/src/output/p_video.cpp b/src/output/p_video.cpp index 5c9bdf3f3..89703940b 100644 --- a/src/output/p_video.cpp +++ b/src/output/p_video.cpp @@ -503,7 +503,7 @@ mpeg4_p2_video_packetizer_c::flush_frames_maybe(frame_type_e next_frame) { int num_bframes = 0; int i; - for (i = 0; m_queued_frames.size() > 0; ++i) + for (i = 0; m_queued_frames.size() > i; ++i) if (FRAME_TYPE_B == m_queued_frames[i].type) ++num_bframes;