Menu

#43 mpeg3cat video - seek sync bug

open
nobody
libmpeg3 (12)
5
2002-04-11
2002-04-11
Anonymous
No

Here is a bug that shows up when using mpeg3cat to
concatenate video streams. A typical symptom of the
bug is that the output video file starts with an
extraneous picture sync code.
The bug is in the interaction between mpeg3io seek and
mpeg3bits bit streams. After opening each file (which
leaves the stream somewhere in the middle), mpeg3cat
does a mpeg3_demux_seek_stream back to 0. But the
video bit stream doesn't notice, so when mpeg3cat then
calls mpeg3_read_video_chunk it gets garbage from the
middle of the stream instead of data from the
beginning.
I don't have a proper fix for the library but adding
these lines after the mpeg3_demux_seek_stream call in
mpeg3cat will eliminate this specific instance of the
problem:
in->vtrack[stream]->video->vstream->bit_number = 0;
in->vtrack[stream]->video->vstream->input_ptr = 0;
This is with mpeg3lib version 1.5.

Discussion


Log in to post a comment.