diff --git a/ChangeLog b/ChangeLog index 2f1b09889..4baba6e6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-02 Moritz Bunkus + + * mkvmerge: bug fix: mkvmerge tries to resyncto the next MPEG + start code in case of error during stream detection. Fix for bug + 259. + 2007-08-31 Moritz Bunkus * mkvmerge: SVQ1 video tracks read from QuickTime files are output diff --git a/src/input/r_mpeg.cpp b/src/input/r_mpeg.cpp index 87ef69f11..d10f52d65 100644 --- a/src/input/r_mpeg.cpp +++ b/src/input/r_mpeg.cpp @@ -276,6 +276,11 @@ mpeg_ps_reader_c::mpeg_ps_reader_c(track_info_c &_ti) throw (error_c): generic_reader_c(_ti) { + init_reader(); +} + +void +mpeg_ps_reader_c::init_reader() { int i; try { @@ -345,7 +350,7 @@ mpeg_ps_reader_c::mpeg_ps_reader_c(track_info_c &_ti) break; case MPEGVIDEO_MPEG_PROGRAM_END_CODE: - done = true; + done = !resync_stream(header); break; case MPEGVIDEO_PROGRAM_STREAM_MAP_START_CODE: @@ -356,7 +361,7 @@ mpeg_ps_reader_c::mpeg_ps_reader_c(track_info_c &_ti) if (!mpeg_is_start_code(header)) { mxverb(3, "mpeg_ps: unknown header 0x%08x at " LLD "\n", header, io->getFilePointer() - 4); - done = true; + done = !resync_stream(header); break; } diff --git a/src/input/r_mpeg.h b/src/input/r_mpeg.h index efdef4895..e6fcc223d 100644 --- a/src/input/r_mpeg.h +++ b/src/input/r_mpeg.h @@ -159,6 +159,8 @@ private: virtual file_status_e finish(); void sort_tracks(); void calculate_global_timecode_offset(); + + void init_reader(); }; class mpeg_ts_reader_c {