OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ae37e4
)
avcodec/utils: Check AVFrame width/height in avcodec_encode_video2()
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 7 Dec 2014 16:23:54 +0000
(17:23 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 7 Dec 2014 16:47:44 +0000
(17:47 +0100)
This is similar to the format check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
a75fe1a
..
db79b67
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-2090,6
+2090,8
@@
int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
if (frame && frame->format == AV_PIX_FMT_NONE)
av_log(avctx, AV_LOG_WARNING, "AVFrame.format is not set\n");
+ if (frame && (frame->width == 0 || frame->height == 0))
+ av_log(avctx, AV_LOG_WARNING, "AVFrame.width or height is not set\n");
av_assert0(avctx->codec->encode2);