Andreas Rheinhardt: > ff_thread_video_encode_frame() already returns blank frames. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > --- > libavcodec/encode.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/encode.c b/libavcodec/encode.c > index 2c02b24cf2..8c6d81286c 100644 > --- a/libavcodec/encode.c > +++ b/libavcodec/encode.c > @@ -263,18 +263,17 @@ static int encode_simple_internal(AVCodecContext > *avctx, AVPacket *avpkt) > av_assert0(codec->cb_type == FF_CODEC_CB_TYPE_ENCODE); > > if (CONFIG_FRAME_THREAD_ENCODER && avci->frame_thread_encoder) > - /* This might unref frame. */ > + /* This will unref frame. */ > ret = ff_thread_video_encode_frame(avctx, avpkt, frame, &got_packet); > else { > ret = ff_encode_encode_cb(avctx, avpkt, frame, &got_packet); > + if (frame) > + av_frame_unref(frame); > } > > if (avci->draining && !got_packet) > avci->draining_done = 1; > > - if (frame) > - av_frame_unref(frame); > - > return ret; > } >
Will apply the remaining patches of this patchset tomorrow unless there are objections. - Andreas _______________________________________________ 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".