[FFmpeg-devel] [PATCH] flv is not low_delay
Sun Dec 12 17:28:19 CET 2010
On Sun, Dec 12, 2010 at 04:00:09PM +0100, Michael Niedermayer wrote:
> On Sun, Dec 12, 2010 at 03:07:26PM +0100, Reimar D?ffinger wrote:
> > On Sun, Dec 12, 2010 at 11:03:47AM +0100, Reimar D?ffinger wrote:
> > > On Sun, Dec 12, 2010 at 04:04:26AM +0100, Michael Niedermayer wrote:
> > > > On Sun, Dec 12, 2010 at 01:46:39AM +0100, Reimar D?ffinger wrote:
> > > > > Hello,
> > > > > I think that current low_delay and thus has_b_frames is set incorrectly
> > > > > for flv.
> > > > > This causes some issues for MPlayer, and while MPlayer probably shouldn't
> > > > > rely on it so much, below patch fixes the issue.
> > > > > Does it look ok to you?
> > > >
> > > > elaborate on why you think low_delay should be 0 here?
> > >
> > > Because in ff_flv_decode_picture_header there is this code line:
> > > s->pict_type = FF_I_TYPE + get_bits(&s->gb, 2);
> > > However I obviously missed the following lines:
> > > s->dropable= s->pict_type > FF_P_TYPE;
> > > if (s->dropable)
> > > s->pict_type = FF_P_TYPE;
> > > which wouold mean that only I and P frames exist, so
> > > the change would be wrong.
> > > Wonder what is going wrong then...
> > Ok, it seems non-B, non-reference frames had MPlayer a bit confused.
> > Really weird, what is the purpose of flv having such frames?
> > Just so that you can drop some frames? Strange.
> purpose probably being that some devel was too lazy to implement B frames
> but still wanted a bit of scalability (when for example network bandwidth wasnt
> enough for the full frame rate)
> iam just guessing here of course though...
Not speaking for the flv case, but non referenced P can also be used as a
replacement for non referenced B for low latency cases (no reordering) or
when you are limited to baseline profile with H264 for example.
More information about the ffmpeg-devel