On Thu, Jan 18, 2018 at 01:03:34PM +0800, Zhong Li wrote: > Currently a hacky way is used for some specific codecs such as > H264/VP6F/DXV (and "lowres" case is broken now). > Replace with a more generic way(an evolution based on a libav commit > 9de9b828 but hasn't been merged since it breaks lowres). > > V1->V2: add "lowres" handle code > > Signed-off-by: Zhong Li <zhong...@intel.com> > --- > libavcodec/utils.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/utils.c b/libavcodec/utils.c > index 427f612..fdd1b46 100644 > --- a/libavcodec/utils.c > +++ b/libavcodec/utils.c > @@ -684,16 +684,12 @@ int attribute_align_arg avcodec_open2(AVCodecContext > *avctx, const AVCodec *code > goto free_and_end; > } > > - // only call ff_set_dimensions() for non H.264/VP6F/DXV codecs so as not > to overwrite previously setup dimensions > - if (!(avctx->coded_width && avctx->coded_height && avctx->width && > avctx->height && > - (avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == > AV_CODEC_ID_VP6F || avctx->codec_id == AV_CODEC_ID_DXV))) { > - if (avctx->coded_width && avctx->coded_height) > + if (avctx->coded_width && avctx->coded_height && (!avctx->width && > !avctx->height || avctx->lowles)) > ret = ff_set_dimensions(avctx, avctx->coded_width, > avctx->coded_height); > - else if (avctx->width && avctx->height) > + else if (avctx->width && avctx->height && (!avctx->coded_width && > !avctx->coded_height || avctx->lowles)) > ret = ff_set_dimensions(avctx, avctx->width, avctx->height); > if (ret < 0) > goto free_and_end; > - }
This has typos in variable names, it will not work nor build please make sure that submitted patches have been tested before [...] -- 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
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel