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
bb697f30
Commit
bb697f30
authored
Sep 27, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dhav: fix demuxer since recent breakage
parent
35a12d20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
dhav.c
libavformat/dhav.c
+11
-2
No files found.
libavformat/dhav.c
View file @
bb697f30
...
...
@@ -289,8 +289,9 @@ static int read_chunk(AVFormatContext *s)
static
int
dhav_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
DHAVContext
*
dhav
=
s
->
priv_data
;
int
ret
;
int
ret
,
stream_index
;
retry:
while
((
ret
=
read_chunk
(
s
))
==
0
)
;
...
...
@@ -357,10 +358,18 @@ static int dhav_read_packet(AVFormatContext *s, AVPacket *pkt)
avpriv_set_pts_info
(
st
,
64
,
1
,
1000
);
}
stream_index
=
dhav
->
type
==
0xf0
?
dhav
->
audio_stream_index
:
dhav
->
video_stream_index
;
if
(
stream_index
<
0
)
{
avio_skip
(
s
->
pb
,
ret
);
if
(
avio_rl32
(
s
->
pb
)
==
MKTAG
(
'd'
,
'h'
,
'a'
,
'v'
))
avio_skip
(
s
->
pb
,
4
);
goto
retry
;
}
ret
=
av_get_packet
(
s
->
pb
,
pkt
,
ret
);
if
(
ret
<
0
)
return
ret
;
pkt
->
stream_index
=
dhav
->
type
==
0xf0
?
dhav
->
audio_stream_index
:
dhav
->
video_
stream_index
;
pkt
->
stream_index
=
stream_index
;
if
(
dhav
->
type
!=
0xfc
)
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
if
(
pkt
->
stream_index
>=
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