[Ffmpeg-devel] [Ffmpeg-devel-old] Question about interlaced_frame and top_field_first

Michael Niedermayer michaelni
Sun Jan 29 04:05:36 CET 2006


On Fri, Jan 27, 2006 at 05:04:14PM +0100, Luca Abeni wrote:
> Hi all,
> while working on the new video4linux2 input, I tried to design it to
> properly set the interlaced_frame and top_field_first fields... How can
> I obtain such result?
> If I understand well, interlaced_frame and top_field_first are set by
> the video codec (CODEC_ID_RAWVIDEO): how can the input format tell the
> video codec how to set such fields? I immagine I can modify
> raw_init_decoder() to properly set interlaced_frame and top_field_first
> in priv_data.pic... But how can it decide if frames will be interlaced
> or not? Should I add a new field to AVCodecContext? Or there is a simple
> way that I am not seeing?

maybe try to set the flags in AVCodecContext.coded_frame but dont forger
to check for NULL


More information about the ffmpeg-devel mailing list