Try to resync to the next MPEG start code in case of error. Fix for bug 259.

This commit is contained in:
Moritz Bunkus 2007-09-02 16:35:46 +00:00
parent 0bf0ec27c1
commit 33971bd6a6
3 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-09-02 Moritz Bunkus <moritz@bunkus.org>
* 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 <moritz@bunkus.org>
* mkvmerge: SVQ1 video tracks read from QuickTime files are output

View File

@ -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;
}

View File

@ -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 {