mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/mediacodecdec_common: make stride and slice-height non-mandatory fields
Fixes decoding on the Samsung Chromebook Pro which do not set the codec output format stride and slice-height fields.
This commit is contained in:
parent
5c6365af45
commit
67d0911f27
@ -385,10 +385,10 @@ static int mediacodec_dec_parse_format(AVCodecContext *avctx, MediaCodecDecConte
|
||||
AMEDIAFORMAT_GET_INT32(s->width, "width", 1);
|
||||
AMEDIAFORMAT_GET_INT32(s->height, "height", 1);
|
||||
|
||||
AMEDIAFORMAT_GET_INT32(s->stride, "stride", 1);
|
||||
AMEDIAFORMAT_GET_INT32(s->stride, "stride", 0);
|
||||
s->stride = s->stride > 0 ? s->stride : s->width;
|
||||
|
||||
AMEDIAFORMAT_GET_INT32(s->slice_height, "slice-height", 1);
|
||||
AMEDIAFORMAT_GET_INT32(s->slice_height, "slice-height", 0);
|
||||
s->slice_height = s->slice_height > 0 ? s->slice_height : s->height;
|
||||
|
||||
if (strstr(s->codec_name, "OMX.Nvidia.")) {
|
||||
|
Loading…
Reference in New Issue
Block a user