Browse Source

libx264: do not set pic quality if no frame is output

Avoids uninitialized reads.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.9
Baptiste Coudurier Anton Khirnov 14 years ago
parent
commit
5caa2de19e
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/libx264.c

+ 2
- 1
libavcodec/libx264.c View File

@@ -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;
}


Loading…
Cancel
Save