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
eb1bde3e
Commit
eb1bde3e
authored
Apr 26, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix nonsense timestamp mess
Originally committed as revision 4166 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
caf5fb95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
dv.c
libavformat/dv.c
+4
-15
No files found.
libavformat/dv.c
View file @
eb1bde3e
...
...
@@ -593,6 +593,7 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
avctx
->
frame_rate
=
sys
->
frame_rate
;
avctx
->
frame_rate_base
=
sys
->
frame_rate_base
;
av_set_pts_info
(
c
->
vst
,
64
,
sys
->
frame_rate_base
,
sys
->
frame_rate
);
avctx
->
width
=
sys
->
width
;
avctx
->
height
=
sys
->
height
;
avctx
->
pix_fmt
=
sys
->
pix_fmt
;
...
...
@@ -744,7 +745,6 @@ DVDemuxContext* dv_init_demux(AVFormatContext *s)
av_free
(
c
);
return
NULL
;
}
av_set_pts_info
(
c
->
vst
,
64
,
1
,
30000
);
c
->
fctx
=
s
;
c
->
ast
[
0
]
=
c
->
ast
[
1
]
=
NULL
;
...
...
@@ -803,7 +803,7 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
pkt
->
size
=
size
;
pkt
->
flags
|=
PKT_FLAG_KEY
;
pkt
->
stream_index
=
c
->
vst
->
id
;
pkt
->
pts
=
c
->
frames
*
sys
->
frame_rate_base
*
(
30000
/
sys
->
frame_rate
)
;
pkt
->
pts
=
c
->
frames
;
c
->
frames
++
;
...
...
@@ -815,22 +815,11 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c,
{
// FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk)
const
DVprofile
*
sys
=
dv_codec_profile
(
&
c
->
vst
->
codec
);
int64_t
frame_number
,
offset
;
int64_t
offset
;
int64_t
size
=
url_filesize
(
url_fileno
(
&
s
->
pb
));
int64_t
max_offset
=
((
size
-
1
)
/
sys
->
frame_size
)
*
sys
->
frame_size
;
if
(
flags
&
AVSEEK_FLAG_BACKWARD
)
{
frame_number
=
av_rescale_rnd
(
timestamp
,
sys
->
frame_rate
,
(
int64_t
)
30000
*
sys
->
frame_rate_base
,
AV_ROUND_DOWN
);
}
else
{
frame_number
=
av_rescale_rnd
(
timestamp
,
sys
->
frame_rate
,
(
int64_t
)
30000
*
sys
->
frame_rate_base
,
AV_ROUND_UP
);
}
offset
=
sys
->
frame_size
*
frame_number
;
offset
=
sys
->
frame_size
*
timestamp
;
if
(
offset
>
max_offset
)
offset
=
max_offset
;
else
if
(
offset
<
0
)
offset
=
0
;
...
...
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