# HG changeset patch # User michael # Date 1072124526 0 # Node ID 62ca7e82de82ec7ba3afce24a1d3e55d02742ec7 # Parent f7e10875d10211d75b608a2a706cd9d094e8d63d better top_field_first behaviour (mostly what rich suggested) diff -r f7e10875d102 -r 62ca7e82de82 libmpcodecs/ve_lavc.c --- a/libmpcodecs/ve_lavc.c Mon Dec 22 17:57:15 2003 +0000 +++ b/libmpcodecs/ve_lavc.c Mon Dec 22 20:22:06 2003 +0000 @@ -701,11 +701,15 @@ pic->linesize[2]=mpi->stride[2]; #if LIBAVCODEC_BUILD >= 4697 - if(mpi->fields & MP_IMGFIELD_ORDERED) - pic->top_field_first= !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); + if(lavc_param_interlaced_dct){ + if((mpi->fields & MP_IMGFIELD_ORDERED) && (mpi->fields & MP_IMGFIELD_INTERLACED)) + pic->top_field_first= !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); + else + pic->top_field_first= 1; - if(lavc_param_top!=-1) - pic->top_field_first= lavc_param_top; + if(lavc_param_top!=-1) + pic->top_field_first= lavc_param_top; + } #endif out_size = avcodec_encode_video(lavc_venc_context, mux_v->buffer, mux_v->buffer_size,