安全编码

Signed-off-by: yj <yujie57@huawei.com>
This commit is contained in:
yj 2024-10-25 07:55:16 +00:00
parent cabdff1a06
commit 702bda0e1b
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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;