Opened 6 years ago
Closed 5 years ago
#8769 closed defect (fixed)
FFmpge crash when use VideoToolBox to encode frames
| Reported by: | yxibng | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | git-master | Keywords: | crash videotoolbox |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
static void vtenc_output_callback(
void *ctx,
void *sourceFrameCtx,
OSStatus status,
VTEncodeInfoFlags flags,
CMSampleBufferRef sample_buffer)
{
AVCodecContext *avctx = ctx;
VTEncContext *vtctx = avctx->priv_data;
ExtraSEI *sei = sourceFrameCtx;
if (vtctx->async_error) {
if(sample_buffer) CFRelease(sample_buffer); //This line cause crash, should remove
return;
}
if (status) {
av_log(avctx, AV_LOG_ERROR, "Error encoding frame: %d\n", (int)status);
set_async_error(vtctx, AVERROR_EXTERNAL);
return;
}
if (!sample_buffer) {
return;
}
if (!avctx->extradata && (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
int set_status = set_extradata(avctx, sample_buffer);
if (set_status) {
set_async_error(vtctx, set_status);
return;
}
}
vtenc_q_push(vtctx, sample_buffer, sei);
}
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (2)
comment:1 by , 6 years ago
| Analyzed by developer: | unset |
|---|---|
| Keywords: | videotoolbox added |
| Priority: | critical → normal |
| Reproduced by developer: | unset |
comment:2 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.



Fixed in adcdf0bc6057a99989a28bb3d1ba65e8b66eff3d.