diff --git a/libavformat/demux.c b/libavformat/demux.c index af0ca32d2e..f0c5c0f8b4 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1978,7 +1978,7 @@ static int has_codec_parameters(const AVStream *st, const char **errmsg_ptr) if (!avctx->width) #ifdef OHOS_OPTIMIZE_DELAY if (!(st->codecpar->codec_id == AV_CODEC_ID_HEVC) && - !(st->disposition & AV_DISPOSITION_ATTACHED_PIC)) + !((unsigned int)st->disposition & AV_DISPOSITION_ATTACHED_PIC)) #endif FAIL("unspecified size"); if (sti->info->found_decoder >= 0 && avctx->pix_fmt == AV_PIX_FMT_NONE) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index eec7eb0cdb..931e693b60 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1119,8 +1119,8 @@ retry: flags = avio_r8(s->pb); size--; #ifdef OHOS_H265_DEMUXER - video_codec_id = flags & FLV_VIDEO_CODECID_MASK; - enhanced_flv = (flags >> 7) & 1; + video_codec_id = (unsigned int)flags & FLV_VIDEO_CODECID_MASK; + enhanced_flv = ((unsigned int)flags >> 7) & 1; if (enhanced_flv) { video_codec_id = avio_rb32(s->pb); size -= 4;