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
b76234c0
Commit
b76234c0
authored
Oct 23, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/avidec: Forward whitelists to the subtitle demuxer
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ad83cfec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
avidec.c
libavformat/avidec.c
+7
-2
No files found.
libavformat/avidec.c
View file @
b76234c0
...
@@ -996,7 +996,7 @@ fail:
...
@@ -996,7 +996,7 @@ fail:
return
0
;
return
0
;
}
}
static
int
read_gab2_sub
(
AVStream
*
st
,
AVPacket
*
pkt
)
static
int
read_gab2_sub
(
AV
FormatContext
*
s
,
AV
Stream
*
st
,
AVPacket
*
pkt
)
{
{
if
(
pkt
->
size
>=
7
&&
if
(
pkt
->
size
>=
7
&&
pkt
->
size
<
INT_MAX
-
AVPROBE_PADDING_SIZE
&&
pkt
->
size
<
INT_MAX
-
AVPROBE_PADDING_SIZE
&&
...
@@ -1039,6 +1039,11 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt)
...
@@ -1039,6 +1039,11 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt)
goto
error
;
goto
error
;
ast
->
sub_ctx
->
pb
=
pb
;
ast
->
sub_ctx
->
pb
=
pb
;
av_assert0
(
!
ast
->
sub_ctx
->
codec_whitelist
&&
!
ast
->
sub_ctx
->
format_whitelist
);
ast
->
sub_ctx
->
codec_whitelist
=
av_strdup
(
s
->
codec_whitelist
);
ast
->
sub_ctx
->
format_whitelist
=
av_strdup
(
s
->
format_whitelist
);
if
(
!
avformat_open_input
(
&
ast
->
sub_ctx
,
""
,
sub_demuxer
,
NULL
))
{
if
(
!
avformat_open_input
(
&
ast
->
sub_ctx
,
""
,
sub_demuxer
,
NULL
))
{
ff_read_packet
(
ast
->
sub_ctx
,
&
ast
->
sub_pkt
);
ff_read_packet
(
ast
->
sub_ctx
,
&
ast
->
sub_pkt
);
*
st
->
codec
=
*
ast
->
sub_ctx
->
streams
[
0
]
->
codec
;
*
st
->
codec
=
*
ast
->
sub_ctx
->
streams
[
0
]
->
codec
;
...
@@ -1390,7 +1395,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
...
@@ -1390,7 +1395,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if
(
size
<
0
)
if
(
size
<
0
)
av_free_packet
(
pkt
);
av_free_packet
(
pkt
);
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_SUBTITLE
&&
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_SUBTITLE
&&
!
st
->
codec
->
codec_tag
&&
read_gab2_sub
(
st
,
pkt
))
{
!
st
->
codec
->
codec_tag
&&
read_gab2_sub
(
s
,
s
t
,
pkt
))
{
ast
->
frame_offset
++
;
ast
->
frame_offset
++
;
avi
->
stream_index
=
-
1
;
avi
->
stream_index
=
-
1
;
ast
->
remaining
=
0
;
ast
->
remaining
=
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