History

avcodec/decode: fix decoding when frames are allocated using AVHWAccel.alloc_frame()

Regression since a1133db30ef07896afd96f067e5c51531a4e85ab

James Almer committed 6 years ago

Commit b6d65971 parent 6d4fdb41 file · +2 −1Browse files

Unified · Split

libavcodec/decode.c+2−1
@@ -1889,7 +1889,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) · 1888 unmodified lines
1889 if (hwaccel) {1889 if (hwaccel) {
1890 if (hwaccel->alloc_frame) {1890 if (hwaccel->alloc_frame) {
1891 ret = hwaccel->alloc_frame(avctx, frame);1891 ret = hwaccel->alloc_frame(avctx, frame);
1892 goto fail;1892 goto end;
1893 }1893 }
1894 } else1894 } else
1895 avctx->sw_pix_fmt = avctx->pix_fmt;1895 avctx->sw_pix_fmt = avctx->pix_fmt;
@@ -1904,6 +1904,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) · 8 unmodified lines
1904 if (ret < 0)1904 if (ret < 0)
1905 goto fail;1905 goto fail;
1906 1906
1907end:
1907 if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&1908 if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
1908 !(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {1909 !(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
1909 frame->width = avctx->width;1910 frame->width = avctx->width;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t