mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat: Add a mechanism to allow demuxers to detect byte based seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1c0d8f2563
commit
e10f5bd05c
@ -1257,6 +1257,14 @@ typedef struct AVFormatContext {
|
|||||||
*/
|
*/
|
||||||
#define RAW_PACKET_BUFFER_SIZE 2500000
|
#define RAW_PACKET_BUFFER_SIZE 2500000
|
||||||
int raw_packet_buffer_remaining_size;
|
int raw_packet_buffer_remaining_size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IO repositioned flag.
|
||||||
|
* This is set by avformat when the underlaying IO context read pointer
|
||||||
|
* is repositioned, for example when doing byte based seeking.
|
||||||
|
* Demuxers can use the flag to detect such changes.
|
||||||
|
*/
|
||||||
|
int io_repositioned;
|
||||||
} AVFormatContext;
|
} AVFormatContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2018,6 +2018,8 @@ static int seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, in
|
|||||||
|
|
||||||
avio_seek(s->pb, pos, SEEK_SET);
|
avio_seek(s->pb, pos, SEEK_SET);
|
||||||
|
|
||||||
|
s->io_repositioned = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user