[COMMON] media: mfc: Not support interframe resolution change
authorSunyoung Kang <sy0816.kang@samsung.com>
Thu, 16 Aug 2018 07:54:57 +0000 (16:54 +0900)
committerhskang <hs1218.kang@samsung.com>
Sun, 9 Sep 2018 21:39:13 +0000 (06:39 +0900)
Currently, VP9 interframe resolution change feature is not supported.
In this case, modify it to cause "Can't play this video" pop up, not panic.

Change-Id: I57f084d63cb7717d95c07f66f85a41100ac29d00
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
drivers/media/platform/exynos/mfc/mfc_isr.c
drivers/media/platform/exynos/mfc/mfc_nal_q.c

index 24abce01bb15cce81da0933d3f4c94a1491ff4a9..aa8677bb22fd40444816caa13fcc67678069216d 100644 (file)
@@ -648,8 +648,11 @@ static void __mfc_handle_frame(struct mfc_ctx *ctx,
                return;
        }
 
-       if (need_dpb_change || need_scratch_change)
-               mfc_debug(2, "[DRC] Interframe resolution change is not supported\n");
+       if (need_dpb_change || need_scratch_change) {
+               mfc_err_ctx("[DRC] Interframe resolution change is not supported\n");
+               mfc_change_state(ctx, MFCINST_ERROR);
+               return;
+       }
 
        if (mfc_is_queue_count_same(&ctx->buf_queue_lock, &ctx->src_buf_queue, 0) &&
                mfc_is_queue_count_same(&ctx->buf_queue_lock, &ctx->dst_buf_queue, 0)) {
index 07ce22d128e93959f512ac14f6f5ab3d512f2c76..ec19cf355e528dae9a270881a7e469d2c0368ef3 100644 (file)
@@ -1688,9 +1688,10 @@ void __mfc_nal_q_handle_frame(struct mfc_ctx *ctx, DecoderOutputStr *pOutStr)
                goto leave_handle_frame;
        }
        if (need_dpb_change || need_scratch_change) {
-               mfc_debug(2, "[NALQ][DRC] Interframe resolution change is not supported\n");
+               mfc_err_ctx("[NALQ][DRC] Interframe resolution change is not supported\n");
                dev->nal_q_handle->nal_q_exception = 1;
                mfc_info_ctx("[NALQ][DRC] nal_q_exception is set (interframe res change)\n");
+               mfc_change_state(ctx, MFCINST_ERROR);
                goto leave_handle_frame;
        }
        if (is_interlaced) {