mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-04 16:52:40 +08:00
[hal_jpegd]: Check output format before decoding
Change-Id: I035297695a4ff027814507e829adba1a767f61e8 Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:

committed by
Herman Chen

parent
516fd94a0b
commit
0faeb9413f
@@ -664,8 +664,13 @@ int dec_decode(MpiDecTestCmd *cmd)
|
||||
}
|
||||
} else {
|
||||
/* NOTE: change output format before jpeg decoding */
|
||||
if (cmd->format < MPP_FMT_BUTT)
|
||||
if (MPP_FRAME_FMT_IS_YUV(cmd->format) || MPP_FRAME_FMT_IS_RGB(cmd->format)) {
|
||||
ret = mpi->control(ctx, MPP_DEC_SET_OUTPUT_FORMAT, &cmd->format);
|
||||
if (ret) {
|
||||
mpp_err("Failed to set output format %d\n", cmd->format);
|
||||
goto MPP_TEST_OUT;
|
||||
}
|
||||
}
|
||||
|
||||
while (!data.eos) {
|
||||
dec_advanced(&data);
|
||||
|
Reference in New Issue
Block a user