[FFmpeg-cvslog] avutil/frame: frame_copy_video: support copying from a smaller to a larger frame
Michael Niedermayer
git at videolan.org
Sat May 31 17:24:02 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 31 17:06:26 2014 +0200| [879aa062f973bf0f357bde8e5722522bc85d1884] | committer: Michael Niedermayer
avutil/frame: frame_copy_video: support copying from a smaller to a larger frame
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=879aa062f973bf0f357bde8e5722522bc85d1884
---
libavutil/frame.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 85208b8..89557ed 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -589,8 +589,8 @@ static int frame_copy_video(AVFrame *dst, const AVFrame *src)
const uint8_t *src_data[4];
int i, planes;
- if (dst->width != src->width ||
- dst->height != src->height)
+ if (dst->width < src->width ||
+ dst->height < src->height)
return AVERROR(EINVAL);
planes = av_pix_fmt_count_planes(dst->format);
@@ -601,7 +601,7 @@ static int frame_copy_video(AVFrame *dst, const AVFrame *src)
memcpy(src_data, src->data, sizeof(src_data));
av_image_copy(dst->data, dst->linesize,
src_data, src->linesize,
- dst->format, dst->width, dst->height);
+ dst->format, src->width, src->height);
return 0;
}
More information about the ffmpeg-cvslog
mailing list