summaryrefslogtreecommitdiffstats
path: root/libavcodec/videotoolboxenc.c
diff options
context:
space:
mode:
authorjerett <wj.jiang@outlook.com>2017-06-23 08:58:35 -0400
committerRick Kern <kernrj@gmail.com>2017-06-23 09:37:34 -0400
commit9f26d670e447767683ed21b1b5ac16423eba4c72 (patch)
tree8c0c81f669a0b7ac4b1465b91ea7a83a7e5d0efc /libavcodec/videotoolboxenc.c
parent82a8724df2a5cd7c64d163a3a0939a14f0d7d024 (diff)
downloadffmpeg-streaming-9f26d670e447767683ed21b1b5ac16423eba4c72.zip
ffmpeg-streaming-9f26d670e447767683ed21b1b5ac16423eba4c72.tar.gz
lavc/videotoolboxenc: fix open videotoolbox bug on iOS8.4
Checks for NULL before using object. Signed-off-by: Rick Kern <kernrj@gmail.com>
Diffstat (limited to 'libavcodec/videotoolboxenc.c')
-rw-r--r--libavcodec/videotoolboxenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 7b901db..22eaeb0 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1285,7 +1285,7 @@ static av_cold int vtenc_init(AVCodecContext *avctx)
kCFAllocatorDefault,
&has_b_frames_cfbool);
- if (!status) {
+ if (!status && has_b_frames_cfbool) {
//Some devices don't output B-frames for main profile, even if requested.
vtctx->has_b_frames = CFBooleanGetValue(has_b_frames_cfbool);
CFRelease(has_b_frames_cfbool);
OpenPOWER on IntegriCloud