diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index eb2d32a5d0..5e35444962 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -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_OPT_COMPAT + avio_seek(pb, -1, SEEK_CUR); +#else int new_packet_size, ret; avio_seek(pb, -1, SEEK_CUR); pos = avio_tell(pb); @@ -3561,6 +3564,7 @@ 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); +#endif return 0; } }