|
|
@@ -1528,8 +1528,12 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags |
|
|
{ |
|
|
{ |
|
|
int ret; |
|
|
int ret; |
|
|
|
|
|
|
|
|
if (avctx->hw_frames_ctx) |
|
|
|
|
|
return av_hwframe_get_buffer(avctx->hw_frames_ctx, frame, 0); |
|
|
|
|
|
|
|
|
if (avctx->hw_frames_ctx) { |
|
|
|
|
|
ret = av_hwframe_get_buffer(avctx->hw_frames_ctx, frame, 0); |
|
|
|
|
|
frame->width = avctx->coded_width; |
|
|
|
|
|
frame->height = avctx->coded_height; |
|
|
|
|
|
return ret; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ((ret = update_frame_pool(avctx, frame)) < 0) |
|
|
if ((ret = update_frame_pool(avctx, frame)) < 0) |
|
|
return ret; |
|
|
return ret; |
|
|
|