diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c index 26de52d857..8ffcd7960e 100644 --- a/libavcodec/imgresample.c +++ b/libavcodec/imgresample.c @@ -756,6 +756,9 @@ int sws_scale(struct SwsContext *ctx, uint8_t* src[], int srcStride[], res = -1; goto the_end; } + } else if (resampled_picture != &dst_pict) { + img_copy(&dst_pict, resampled_picture, current_pix_fmt, + ctx->resampling_ctx->owidth, ctx->resampling_ctx->oheight); } the_end: