Skip to content

Commit 7044954

Browse files
committed
Fix hwaccel consumer scale with movit
1 parent 9812ca7 commit 7044954

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/modules/avformat/producer_avformat.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,6 @@ static mlt_image_format pick_image_format(enum AVPixelFormat pix_fmt,
823823
case AV_PIX_FMT_YUV420P:
824824
case AV_PIX_FMT_YUVJ420P:
825825
case AV_PIX_FMT_YUVA420P:
826-
case AV_PIX_FMT_NV12:
827826
return mlt_image_yuv420p;
828827
case AV_PIX_FMT_RGB24:
829828
case AV_PIX_FMT_BGR24:
@@ -835,7 +834,6 @@ static mlt_image_format pick_image_format(enum AVPixelFormat pix_fmt,
835834
case AV_PIX_FMT_BAYER_RGGB16LE:
836835
return mlt_image_rgb;
837836
case AV_PIX_FMT_YUV420P10LE:
838-
case AV_PIX_FMT_P010LE:
839837
return mlt_image_yuv420p10;
840838
case AV_PIX_FMT_YUV422P10LE:
841839
case AV_PIX_FMT_YUV444P10LE:
@@ -2704,9 +2702,7 @@ static int producer_get_image(mlt_frame frame,
27042702

27052703
// Only change the requested image format for special cases
27062704
*format = pick_image_format(self->vfilter_out ? av_buffersink_get_format(self->vfilter_out)
2707-
: self->hwaccel.filter_out
2708-
? av_buffersink_get_format(self->hwaccel.filter_out)
2709-
: codec_params->format,
2705+
: codec_params->format,
27102706
*format);
27112707

27122708
// Duplicate the last image if necessary

src/modules/avformat/producer_avformat.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ notes: >
3030
MLT_AVFORMAT_HWACCEL_DEVICE, and MLT_AVFORMAT_HWACCEL_PPS to affect the usage
3131
of hwaccel decoding globally. MLT_AVFORMAT_HWACCEL_PPS sets a threshold for
3232
pixels per second (width * height * fps); hwaccel is only used when the
33-
video's PPS is less than or equal to this threshold.
33+
video's PPS is less than or equal to this threshold. You should not use
34+
MLT_AVFORMAT_HWACCEL_PPS in conjunction with the consumer scale property.
3435
Hardware decoding gracefully falls back to software decoding.
3536
3637
bugs:

0 commit comments

Comments
 (0)