Skip to content

Comments

Write diag msg if aom_codec_peek_stream_info fails#3057

Open
wantehchang wants to merge 1 commit intoAOMediaCodec:mainfrom
wantehchang:better-error-reporting-peek-stream-info
Open

Write diag msg if aom_codec_peek_stream_info fails#3057
wantehchang wants to merge 1 commit intoAOMediaCodec:mainfrom
wantehchang:better-error-reporting-peek-stream-info

Conversation

@wantehchang
Copy link
Collaborator

Write a diagnostic message if aom_codec_peek_stream_info() fails.

Write a diagnostic message if aom_codec_peek_stream_info() fails.
@wantehchang wantehchang requested a review from y-guyon February 24, 2026 00:21
if (aom_codec_peek_stream_info(decoderInterface, sample->data.data, sample->data.size, &streamInfo) != AOM_CODEC_OK) {
aom_codec_err_t err = aom_codec_peek_stream_info(decoderInterface, sample->data.data, sample->data.size, &streamInfo);
if (err != AOM_CODEC_OK) {
avifDiagnosticsPrintf(codec->diag, "aom_codec_peek_stream_info() failed: %s", aom_codec_err_to_string(err));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an example of avifdec output.

Before:

ERROR: Failed to decode frame: Decoding of color planes failed
Diagnostics:
 * tile->codec->getNextImage() failed

After:

ERROR: Failed to decode frame: Decoding of color planes failed
Diagnostics:
 * aom_codec_peek_stream_info() failed: Unspecified internal error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants