mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/videotoolbox: fix opaque_ref handling
This is a partial fix - to fix videotoolbox fully (with multithreaded hwaccel decoding), much more work would be required. Before this change, an assertion failure would trigger: $ ffmpeg -hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld -i h264.ts -f null -y /dev/null Assertion (frame->private_ref && frame->private_ref->size == sizeof(FrameDecodeData)) || !(avctx->codec->capabilities & (1 << 1)) failed at libavcodec/decode.c:620 Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
b7f963c444
commit
9283a4f19b
@ -27,6 +27,7 @@
|
||||
#include "libavutil/avutil.h"
|
||||
#include "libavutil/hwcontext.h"
|
||||
#include "bytestream.h"
|
||||
#include "decode.h"
|
||||
#include "h264dec.h"
|
||||
#include "hevcdec.h"
|
||||
#include "mpegvideo.h"
|
||||
@ -70,6 +71,10 @@ static int videotoolbox_buffer_copy(VTContext *vtctx,
|
||||
|
||||
int ff_videotoolbox_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
|
||||
{
|
||||
int ret = ff_attach_decode_data(frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
frame->width = avctx->width;
|
||||
frame->height = avctx->height;
|
||||
frame->format = avctx->pix_fmt;
|
||||
|
Loading…
Reference in New Issue
Block a user