On Tue, Jul 15, 2014 at 9:46 AM, Marc-Antoine Arnaud
<[email protected]> wrote:
> ---
>  libavcodec/mpeg12enc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
> index f87286a..c9bfa3d 100644
> --- a/libavcodec/mpeg12enc.c
> +++ b/libavcodec/mpeg12enc.c
> @@ -424,7 +424,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, 
> int picture_number)
>          if (s->progressive_sequence)
>              put_bits(&s->pb, 1, 0);             /* no repeat */
>          else
> -            put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first);
> +            put_bits(&s->pb, 1, s->avctx->field_order == AV_FIELD_TT);
>          /* XXX: optimize the generation of this flag with entropy measures */
>          s->frame_pred_frame_dct = s->progressive_sequence;

field_order is a container property, and unfortunately it is not
always set, so we have to rely on the frame information. Did you
encounter any problem with this code?

-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to