projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07a227b
)
libx264: do not set pic quality if no frame is output
author
Baptiste Coudurier
<baptiste.coudurier@gmail.com>
Sun, 30 Jan 2011 01:05:42 +0000
(17:05 -0800)
committer
Anton Khirnov
<anton@khirnov.net>
Mon, 8 Aug 2011 12:33:09 +0000
(14:33 +0200)
Avoids uninitialized reads.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/libx264.c
patch
|
blob
|
history
diff --git
a/libavcodec/libx264.c
b/libavcodec/libx264.c
index
17cae71
..
bcf8b1f
100644
(file)
--- a/
libavcodec/libx264.c
+++ b/
libavcodec/libx264.c
@@
-144,7
+144,8
@@
static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
}
x4->out_pic.key_frame = pic_out.b_keyframe;
- x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
+ if (bufsize)
+ x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
return bufsize;
}