[MPlayer-dev-eng] [PATCH] find_sub bugfix when sub switched
Ulion
ulion2002 at gmail.com
Sun Oct 21 16:11:38 CEST 2007
2007/10/21, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Sun, Oct 21, 2007 at 01:59:31PM +0200, Reimar Döffinger wrote:
> > On Thu, Oct 11, 2007 at 10:08:38PM +0800, Ulion wrote:
> > > I found a bug of find_sub, it has two static variables
> > > nosub_range_start and nosub_range_end. These two variables did not be
> > > reset when sub stream switched, here's the fix patch and test case
> > > (two srt, the first sub stream will invisible until the first sub time
> > > of second sub stream after switched to the second substream and
> > > switched back.)
> >
> > Seems like a somewhat ugly way to fix it (assuming that subd pointer
> > changes and not just the data), but I currently have no better idea.
> > Anyone else?
The original code assuming subd not changed or all subtitle streams
has same timestamps and the two static variables is for prevent
rechecking the sub datas for a time range without subtitles. This is
work for a fixed subtitle streams, but for multiple subtitle streams,
this trick not work. Current fix is to limit the trick only work for
the one subtitle stream last called with find_sub. About the subdata
change in the same subtitle stream, I think the data will not change
once loaded, and the original code also assuming it.
>
> And if you haven't done so read DOCS/tech/svn-howto.txt and if you agree
> with the policy please contact Diego to get a SVN account.
> Please note that MPlayer accounts traditionally come with permissions
> for FFmpeg SVN as well, take care not to tread on their territory
> without a mail on ffmpeg-dev (libav*, libpostproc and libswscale belong
> to FFmpeg). Hmm.. This may be worth adding to svn-howto.txt...
> If you have any pending patches you consider good enough for SVN you can
> then apply them after giving a warning and about a day of additional time
> for objections.
>
> Greetings,
> Reimar Döffinger
That's my honor, I would have a try.
--
Ulion
More information about the MPlayer-dev-eng
mailing list