summaryrefslogtreecommitdiff
path: root/libavcodec/mediacodecdec_common.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2018-04-11 10:28:56 +0200
committerMatthieu Bouron <matthieu.bouron@gmail.com>2018-04-19 13:55:30 +0200
commit67d0911f27e29d551865dbca3af5c49abe029885 (patch)
tree6ac069145f1923375610e2437d7a704f0b09d0be /libavcodec/mediacodecdec_common.c
parent5c6365af454fb24f20d753ed99dd8e2b60e85035 (diff)
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.
Diffstat (limited to 'libavcodec/mediacodecdec_common.c')
-rw-r--r--libavcodec/mediacodecdec_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c
index e31adb487c..e59cf19aad 100644
--- a/libavcodec/mediacodecdec_common.c
+++ b/libavcodec/mediacodecdec_common.c
@@ -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.")) {