Skip to content

Commit

Permalink
fix: 判断 time_base 是否为空指针
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohappy committed Dec 13, 2024
1 parent 020f0bb commit 45d6bad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/avcodec/clib/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ int open_codec_context(AVCodecContext** dec_ctx, enum AVCodecID codec_id, AVCode
format_log(ERROR, "Failed to copy %s codec parameters to decoder context\n", avcodec_get_name(codec_id));
return ret;
}

(*dec_ctx)->pkt_timebase = *time_base;
if (time_base) {
(*dec_ctx)->pkt_timebase = *time_base;
}
(*dec_ctx)->flags2 |= AV_CODEC_FLAG2_SHOW_ALL;

if (wasm_pthread_support()) {
Expand Down

0 comments on commit 45d6bad

Please sign in to comment.