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
c0c37848
Commit
c0c37848
authored
Apr 27, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export pts if available
Originally committed as revision 3081 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
293ed23f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
ogg.c
libavformat/ogg.c
+4
-0
No files found.
libavformat/ogg.c
View file @
c0c37848
...
@@ -172,6 +172,7 @@ static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap)
...
@@ -172,6 +172,7 @@ static int ogg_read_header(AVFormatContext *avfcontext, AVFormatParameters *ap)
int
i
;
int
i
;
avfcontext
->
ctx_flags
|=
AVFMTCTX_NOHEADER
;
avfcontext
->
ctx_flags
|=
AVFMTCTX_NOHEADER
;
av_set_pts_info
(
avfcontext
,
60
,
1
,
AV_TIME_BASE
);
ogg_sync_init
(
&
context
->
oy
)
;
ogg_sync_init
(
&
context
->
oy
)
;
buf
=
ogg_sync_buffer
(
&
context
->
oy
,
DECODER_BUFFER_SIZE
)
;
buf
=
ogg_sync_buffer
(
&
context
->
oy
,
DECODER_BUFFER_SIZE
)
;
...
@@ -218,6 +219,9 @@ static int ogg_read_packet(AVFormatContext *avfcontext, AVPacket *pkt) {
...
@@ -218,6 +219,9 @@ static int ogg_read_packet(AVFormatContext *avfcontext, AVPacket *pkt) {
return
-
EIO
;
return
-
EIO
;
pkt
->
stream_index
=
0
;
pkt
->
stream_index
=
0
;
memcpy
(
pkt
->
data
,
op
.
packet
,
op
.
bytes
);
memcpy
(
pkt
->
data
,
op
.
packet
,
op
.
bytes
);
if
(
avfcontext
->
streams
[
0
]
->
codec
.
sample_rate
&&
op
.
granulepos
!=-
1
)
pkt
->
pts
=
av_rescale
(
op
.
granulepos
,
AV_TIME_BASE
,
avfcontext
->
streams
[
0
]
->
codec
.
sample_rate
);
// printf("%lld %d %d\n", pkt->pts, (int)op.granulepos, avfcontext->streams[0]->codec.sample_rate);
return
op
.
bytes
;
return
op
.
bytes
;
}
}
...
...
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