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
de11ee90
Commit
de11ee90
authored
Mar 17, 2011
by
Vladimir Pantelic
Committed by
Mans Rullgard
Mar 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfdec: subtract the preroll value and thus output 0 based timestamps
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
f1f60f52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
asfdec.c
libavformat/asfdec.c
+2
-1
avformat.h
libavformat/avformat.h
+0
-2
No files found.
libavformat/asfdec.c
View file @
de11ee90
...
...
@@ -236,6 +236,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
if
(
!
asf_st
)
return
AVERROR
(
ENOMEM
);
st
->
priv_data
=
asf_st
;
st
->
start_time
=
0
;
start_time
=
asf
->
hdr
.
preroll
;
asf_st
->
stream_language_index
=
128
;
// invalid stream index means no language info
...
...
@@ -960,7 +961,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
/* new packet */
av_new_packet
(
&
asf_st
->
pkt
,
asf
->
packet_obj_size
);
asf_st
->
seq
=
asf
->
packet_seq
;
asf_st
->
pkt
.
dts
=
asf
->
packet_frag_timestamp
;
asf_st
->
pkt
.
dts
=
asf
->
packet_frag_timestamp
-
asf
->
hdr
.
preroll
;
asf_st
->
pkt
.
stream_index
=
asf
->
stream_index
;
asf_st
->
pkt
.
pos
=
asf_st
->
packet_pos
=
asf
->
packet_pos
;
...
...
libavformat/avformat.h
View file @
de11ee90
...
...
@@ -534,8 +534,6 @@ typedef struct AVStream {
* Only set this if you are absolutely 100% sure that the value you set
* it to really is the pts of the first frame.
* This may be undefined (AV_NOPTS_VALUE).
* @note The ASF header does NOT contain a correct start_time the ASF
* demuxer must NOT set this.
*/
int64_t
start_time
;
...
...
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