[FFmpeg-cvslog] lavc/videotoolboxenc: fix open videotoolbox bug on iOS8.4
jerett
git at videolan.org
Fri Jun 23 16:38:14 EEST 2017
ffmpeg | branch: master | jerett <wj.jiang at outlook.com> | Fri Jun 23 08:58:35 2017 -0400| [9f26d670e447767683ed21b1b5ac16423eba4c72] | committer: Rick Kern
lavc/videotoolboxenc: fix open videotoolbox bug on iOS8.4
Checks for NULL before using object.
Signed-off-by: Rick Kern <kernrj at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f26d670e447767683ed21b1b5ac16423eba4c72
---
libavcodec/videotoolboxenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 7b901dbd69..22eaeb0a60 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);
More information about the ffmpeg-cvslog
mailing list