Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7b3c1382
Commit
7b3c1382
authored
Oct 11, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
100l (forgoten seeking functions)
Originally committed as revision 3585 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b1d041c1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
11 deletions
+14
-11
avformat.h
libavformat/avformat.h
+1
-1
avidec.c
libavformat/avidec.c
+1
-1
ffm.c
libavformat/ffm.c
+2
-2
mov.c
libavformat/mov.c
+1
-1
raw.c
libavformat/raw.c
+6
-3
rtsp.c
libavformat/rtsp.c
+1
-1
wav.c
libavformat/wav.c
+2
-2
No files found.
libavformat/avformat.h
View file @
7b3c1382
...
...
@@ -441,7 +441,7 @@ int ff_wav_init(void);
/* raw.c */
int
pcm_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
);
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int
raw_init
(
void
);
/* mp3.c */
...
...
libavformat/avidec.c
View file @
7b3c1382
...
...
@@ -649,7 +649,7 @@ static int locate_frame_in_index(AVIIndexEntry *entries,
return
m
;
}
static
int
avi_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
)
static
int
avi_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
AVIContext
*
avi
=
s
->
priv_data
;
AVStream
*
st
;
...
...
libavformat/ffm.c
View file @
7b3c1382
...
...
@@ -627,7 +627,7 @@ static int64_t get_pts(AVFormatContext *s, offset_t pos)
/* seek to a given time in the file. The file read pointer is
positionned at or before pts. XXX: the following code is quite
approximative */
static
int
ffm_seek
(
AVFormatContext
*
s
,
int
64_t
wanted_pt
s
)
static
int
ffm_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
wanted_pts
,
int
flag
s
)
{
FFMContext
*
ffm
=
s
->
priv_data
;
offset_t
pos_min
,
pos_max
,
pos
;
...
...
@@ -662,7 +662,7 @@ static int ffm_seek(AVFormatContext *s, int64_t wanted_pts)
pos_min
=
pos
+
FFM_PACKET_SIZE
;
}
}
pos
=
pos_min
;
pos
=
(
flags
&
AVSEEK_FLAG_BACKWARD
)
?
pos_min
:
pos_max
;
if
(
pos
>
0
)
pos
-=
FFM_PACKET_SIZE
;
found:
...
...
libavformat/mov.c
View file @
7b3c1382
...
...
@@ -1846,7 +1846,7 @@ readchunk:
/**
* Seek method based on the one described in the Appendix C of QTFileFormat.pdf
*/
static
int
mov_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
)
static
int
mov_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
MOVContext
*
mov
=
(
MOVContext
*
)
s
->
priv_data
;
MOVStreamContext
*
sc
;
...
...
libavformat/raw.c
View file @
7b3c1382
...
...
@@ -126,7 +126,7 @@ static int raw_read_close(AVFormatContext *s)
}
int
pcm_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
)
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
AVStream
*
st
;
int
block_align
,
byte_rate
;
...
...
@@ -158,8 +158,11 @@ int pcm_read_seek(AVFormatContext *s,
return
-
1
;
/* compute the position by aligning it to block_align */
pos
=
av_rescale
(
timestamp
*
byte_rate
,
st
->
time_base
.
num
,
st
->
time_base
.
den
);
pos
=
(
pos
/
block_align
)
*
block_align
;
pos
=
av_rescale_rnd
(
timestamp
*
byte_rate
,
st
->
time_base
.
num
,
st
->
time_base
.
den
*
(
int64_t
)
block_align
,
(
flags
&
AVSEEK_FLAG_BACKWARD
)
?
AV_ROUND_DOWN
:
AV_ROUND_UP
);
pos
*=
block_align
;
/* recompute exact position */
st
->
cur_dts
=
av_rescale
(
pos
,
st
->
time_base
.
den
,
byte_rate
*
(
int64_t
)
st
->
time_base
.
num
);
...
...
libavformat/rtsp.c
View file @
7b3c1382
...
...
@@ -1111,7 +1111,7 @@ static int rtsp_read_pause(AVFormatContext *s)
}
static
int
rtsp_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
)
int64_t
timestamp
,
int
flags
)
{
RTSPState
*
rt
=
s
->
priv_data
;
...
...
libavformat/wav.c
View file @
7b3c1382
...
...
@@ -344,7 +344,7 @@ static int wav_read_close(AVFormatContext *s)
}
static
int
wav_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
timestamp
)
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
AVStream
*
st
;
...
...
@@ -359,7 +359,7 @@ static int wav_read_seek(AVFormatContext *s,
default:
break
;
}
return
pcm_read_seek
(
s
,
stream_index
,
timestamp
);
return
pcm_read_seek
(
s
,
stream_index
,
timestamp
,
flags
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment