[FFmpeg-devel] [PATCH] h264: Correctly initialize interlaced_frame if tff is set
Michael Niedermayer
michael at niedermayer.cc
Wed Feb 15 01:21:45 EET 2017
On Sat, Feb 11, 2017 at 02:56:32AM +0100, Michael Niedermayer wrote:
> On Fri, Feb 10, 2017 at 05:21:00PM -0500, Vittorio Giovara wrote:
> > In particular cases, it is possible to initialize top_field_first
> > but not interlaced_frame. Make sure to correctly tag a frame
> > as interlaced when this happens.
> >
> > Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
> > ---
> > Please CC.
> > Vittorio
> >
> > libavcodec/h264_slice.c | 13 ++++++++-----
> > 1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
> > index 91a3b25..eeb5202 100644
> > --- a/libavcodec/h264_slice.c
> > +++ b/libavcodec/h264_slice.c
> > @@ -1174,20 +1174,23 @@ static int h264_export_frame_props(H264Context *h)
> >
> > if (cur->field_poc[0] != cur->field_poc[1]) {
> > /* Derive top_field_first from field pocs. */
> > - cur->f->top_field_first = cur->field_poc[0] < cur->field_poc[1];
> > + cur->f->interlaced_frame =
> > + cur->f->top_field_first = cur->field_poc[0] < cur->field_poc[1];
>
> this looks like it would set interlaced_frame = 0 if
> cur->field_poc[0] > cur->field_poc[1];
>
> also, do you have a sample that is affected by this ?
thx for the sample, ive pushed a different fix
does that fix this completely or is some issue remaining ?
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170215/2e4fb0f5/attachment.sig>
More information about the ffmpeg-devel
mailing list