[MPlayer-dev-eng] Patch to fix seeking in H264 TS

Nico Sabbi Nicola.Sabbi at poste.it
Fri Feb 15 23:35:46 CET 2008


Il Friday 15 February 2008 23:34:17 Loren Merritt ha scritto:
> On Fri, 15 Feb 2008, Nico Sabbi wrote:
> > On Friday 15 February 2008 05:27:50 Ian Rickards wrote:
> >>
> >> mplayer doesn't seek in BBC HD H.264 transport streams; when you
> >> try to seek it gets stuck looping forever in demux_seek_ts waiting
> >> for a 0x105 packet that doesn't ever arrive.  The following fixes
> >> it, and matches the code on line 239 of video.c to sync to a mpeg
> >> slice:
> >>
> >> demux_ts.c
> >> @@ -3164,7 +3167,7 @@
> >>                         break;
> >>                 else    //H264
> >>                 {
> >> -                       if((i & ~0x60) == 0x105) break;
> >> +                       if((i & ~0x60) == 0x105 || (i & ~0x60) ==
> >> 0x102 || (i & ~0x60) == 0x101) break; }
> >>
> >>                 if(!i || !skip_video_packet(d_video)) break; //
> >> EOF?
> >>
> >
> > I don't remember what are NALs 01 and 02; remind me, please
> 
> 1: normal slice
> 2: slice with data partitioning (3 and 4 are also for data partitioning, 
> but 2 comes first in the bitstream)
> 5: IDR slice
> 
> --Loren Merritt

well, in this case that patch doesn't look correct to me: seeking 
must find a seekable (IDR) slice, right?



More information about the MPlayer-dev-eng mailing list