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
0b99e858
Commit
0b99e858
authored
Sep 08, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmdec: fix seeking for non indexed files
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
59810f83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ffmdec.c
libavformat/ffmdec.c
+1
-1
lavf_ffm
tests/ref/seek/lavf_ffm
+4
-4
No files found.
libavformat/ffmdec.c
View file @
0b99e858
...
...
@@ -461,7 +461,7 @@ static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, in
av_dlog
(
s
,
"wanted_pts=%0.6f
\n
"
,
wanted_pts
/
1000000
.
0
);
/* find the position using linear interpolation (better than
dichotomy in typical cases) */
if
(
ffm
->
write_index
<
ffm
->
file_size
)
{
if
(
ffm
->
write_index
&&
ffm
->
write_index
<
ffm
->
file_size
)
{
if
(
get_dts
(
s
,
FFM_PACKET_SIZE
)
<
wanted_pts
)
{
pos_min
=
FFM_PACKET_SIZE
;
pos_max
=
ffm
->
write_index
-
FFM_PACKET_SIZE
;
...
...
tests/ref/seek/lavf_ffm
View file @
0b99e858
...
...
@@ -4,7 +4,7 @@ ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
ret: 0 st: 0 flags:0 ts: 0.788334
ret: 0 st: 1 flags:1 dts: 0.
783673 pts: 0.783673 pos: 315392
size: 209
ret: 0 st: 1 flags:1 dts: 0.
809796 pts: 0.809796 pos: 327680
size: 209
ret: 0 st: 0 flags:1 ts:-0.317499
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 1 flags:0 ts: 2.576668
...
...
@@ -12,7 +12,7 @@ ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
ret: 0 st: 1 flags:1 ts: 1.470835
ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
ret: 0 st: 1 flags:1 dts: 0.3
39592 pts: 0.339592 pos: 155648
size: 209
ret: 0 st: 1 flags:1 dts: 0.3
65714 pts: 0.365714 pos: 163840
size: 209
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 0 flags:0 ts: 2.153336
...
...
@@ -40,7 +40,7 @@ ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st:-1 flags:1 ts: 1.989173
ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
ret: 0 st: 0 flags:0 ts: 0.883340
ret: 0 st:
0 flags:0 dts: 0.880000 pts: 0.920000 pos: 339968 size: 12307
ret: 0 st:
1 flags:1 dts: 0.888163 pts: 0.888163 pos: 352256 size: 209
ret: 0 st: 0 flags:1 ts:-0.222493
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 1 flags:0 ts: 2.671674
...
...
@@ -48,6 +48,6 @@ ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
ret: 0 st: 1 flags:1 ts: 1.565841
ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
ret: 0 st: 1 flags:1 dts: 0.4
44082 pts: 0.444082 pos: 204800
size: 209
ret: 0 st: 1 flags:1 dts: 0.4
96327 pts: 0.496327 pos: 221184
size: 209
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
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