-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lavc/videotoolboxenc: always set pixel buffer info
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
debian/patches/0076-alway-set-videotoolboxenc-pixel-buffer-info.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Index: FFmpeg/libavcodec/videotoolboxenc.c | ||
=================================================================== | ||
--- FFmpeg.orig/libavcodec/videotoolboxenc.c | ||
+++ FFmpeg/libavcodec/videotoolboxenc.c | ||
@@ -1034,9 +1034,10 @@ static int create_cv_pixel_buffer_info(A | ||
CFNumberRef width_num = NULL; | ||
CFNumberRef height_num = NULL; | ||
CFMutableDictionaryRef pixel_buffer_info = NULL; | ||
+ enum AVPixelFormat pix_fmt = avctx->pix_fmt == AV_PIX_FMT_VIDEOTOOLBOX ? avctx->sw_pix_fmt : avctx->pix_fmt; | ||
int cv_color_format; | ||
int status = get_cv_pixel_format(avctx, | ||
- avctx->pix_fmt, | ||
+ pix_fmt, | ||
avctx->color_range, | ||
&cv_color_format, | ||
NULL); | ||
@@ -1687,11 +1688,9 @@ static int vtenc_configure_encoder(AVCod | ||
kCFBooleanTrue); | ||
} | ||
|
||
- if (avctx->pix_fmt != AV_PIX_FMT_VIDEOTOOLBOX) { | ||
- status = create_cv_pixel_buffer_info(avctx, &pixel_buffer_info); | ||
- if (status) | ||
- goto init_cleanup; | ||
- } | ||
+ status = create_cv_pixel_buffer_info(avctx, &pixel_buffer_info); | ||
+ if (status) | ||
+ goto init_cleanup; | ||
|
||
vtctx->dts_delta = vtctx->has_b_frames ? -1 : 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters