diff options
author | jerett <wj.jiang@outlook.com> | 2017-06-23 08:58:35 -0400 |
---|---|---|
committer | Rick Kern <kernrj@gmail.com> | 2017-06-23 09:37:34 -0400 |
commit | 9f26d670e447767683ed21b1b5ac16423eba4c72 (patch) | |
tree | 8c0c81f669a0b7ac4b1465b91ea7a83a7e5d0efc /libavcodec | |
parent | 82a8724df2a5cd7c64d163a3a0939a14f0d7d024 (diff) | |
download | ffmpeg-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')
-rw-r--r-- | libavcodec/videotoolboxenc.c | 2 |
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); |