mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
Merge commit '2cef68da69a17ed09c313ba3c3850ec1cc0a80e0'
* commit '2cef68da69a17ed09c313ba3c3850ec1cc0a80e0': vda: error out if decoded CVPixelBuffer is empty Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
2ab6deb36f
@ -380,12 +380,14 @@ static int vda_h264_end_frame(AVCodecContext *avctx)
|
|||||||
|
|
||||||
CFRelease(coded_frame);
|
CFRelease(coded_frame);
|
||||||
|
|
||||||
|
if (!vda->frame)
|
||||||
|
return AVERROR_UNKNOWN;
|
||||||
|
|
||||||
if (status != kVDADecoderNoErr) {
|
if (status != kVDADecoderNoErr) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Failed to decode frame (%d)\n", status);
|
av_log(avctx, AV_LOG_ERROR, "Failed to decode frame (%d)\n", status);
|
||||||
return AVERROR_UNKNOWN;
|
return AVERROR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vda->frame) {
|
|
||||||
av_buffer_unref(&frame->buf[0]);
|
av_buffer_unref(&frame->buf[0]);
|
||||||
|
|
||||||
frame->buf[0] = av_buffer_create((uint8_t*)vda->frame,
|
frame->buf[0] = av_buffer_create((uint8_t*)vda->frame,
|
||||||
@ -397,7 +399,6 @@ static int vda_h264_end_frame(AVCodecContext *avctx)
|
|||||||
|
|
||||||
frame->data[3] = (uint8_t*)vda->frame;
|
frame->data[3] = (uint8_t*)vda->frame;
|
||||||
vda->frame = NULL;
|
vda->frame = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user