mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
[media] coda: adjust sequence offset after unexpected decoded frame
If userspace doesn't properly separate the bitstream input into individual frames (which may happen for example on slightly corrupted streams) the CODA hardware may decode more frames than we expect. We already log an error in this case, but it's also necessary to adjust the sequence offset. Otherwise we spam the log with a sequence number mismatch on every frame frame after the unexpected one. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
07ba277f89
commit
83f31c8a5f
@ -1822,6 +1822,7 @@ static void coda_finish_decode(struct coda_ctx *ctx)
|
||||
memset(&ctx->frame_metas[decoded_idx], 0,
|
||||
sizeof(struct coda_buffer_meta));
|
||||
ctx->frame_metas[decoded_idx].sequence = val;
|
||||
ctx->sequence_offset++;
|
||||
}
|
||||
mutex_unlock(&ctx->bitstream_mutex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user