fix dirty data makes read err

Signed-off-by: sunyujie <1458565796@qq.com>
This commit is contained in:
sunyujie 2024-11-22 14:38:57 +08:00
parent 67e35e6186
commit 48bfe76c88

View File

@ -3549,6 +3549,9 @@ static int mpegts_resync(AVFormatContext *s, int seekback, const uint8_t *curren
if (avio_feof(pb))
return AVERROR_EOF;
if (c == 0x47) {
#ifdef OHOS_FRAME_TYPE_COMPAT
avio_seek(pb, -1, SEEK_CUR);
#else
int new_packet_size, ret;
avio_seek(pb, -1, SEEK_CUR);
pos = avio_tell(pb);
@ -3561,7 +3564,8 @@ static int mpegts_resync(AVFormatContext *s, int seekback, const uint8_t *curren
ts->raw_packet_size = new_packet_size;
}
avio_seek(pb, pos, SEEK_SET);
return 0;
#endif
return 0;
}
}
av_log(s, AV_LOG_ERROR,