Hi, On Tue, Jul 30, 2019 at 10:06 PM Linjie Fu <linjie...@intel.com> wrote: > [...] > diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c > index feb52ea..800ba18 100644 > --- a/libavcodec/libvpxenc.c > +++ b/libavcodec/libvpxenc.c > @@ -1067,6 +1067,15 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket > *pkt, > int res, coded_size; > vpx_enc_frame_flags_t flags = 0; > > + if (frame && (avctx->width != frame->width || > + avctx->height != frame->height)) { > + avctx->width = frame->width; > + avctx->height = frame->height; > + > + avctx->codec->close(avctx);
You shouldn't need to destroy the encoder for a resolution change, unless I'm missing something. Take a look at resize_test.cc [1]. [1] https://chromium.googlesource.com/webm/libvpx/+/refs/heads/master/test/resize_test.cc#305 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".