Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Mira
ffmpeg
Commits
ff03df64
Commit
ff03df64
authored
10 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avformat/mpeg: Use av_find_input_format() instead of directly linking to the demuxer
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
2ce10542
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/mpeg.c
+5
-1
5 additions, 1 deletion
libavformat/mpeg.c
with
5 additions
and
1 deletion
libavformat/mpeg.c
+
5
−
1
View file @
ff03df64
...
...
@@ -683,6 +683,7 @@ static int vobsub_read_header(AVFormatContext *s)
int
stream_id
=
-
1
;
char
id
[
64
]
=
{
0
};
char
alt
[
MAX_LINE_SIZE
]
=
{
0
};
AVInputFormat
*
iformat
;
sub_name
=
av_strdup
(
s
->
filename
);
fname_len
=
strlen
(
sub_name
);
...
...
@@ -696,6 +697,9 @@ static int vobsub_read_header(AVFormatContext *s)
memcpy
(
ext
,
!
strncmp
(
ext
,
"IDX"
,
3
)
?
"SUB"
:
"sub"
,
3
);
av_log
(
s
,
AV_LOG_VERBOSE
,
"IDX/SUB: %s -> %s
\n
"
,
s
->
filename
,
sub_name
);
if
(
!
(
iformat
=
av_find_input_format
(
"mpeg"
)))
return
AVERROR_DEMUXER_NOT_FOUND
;
vobsub
->
sub_ctx
=
avformat_alloc_context
();
if
(
!
vobsub
->
sub_ctx
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -703,7 +707,7 @@ static int vobsub_read_header(AVFormatContext *s)
if
((
ret
=
ff_copy_whitelists
(
vobsub
->
sub_ctx
,
s
))
<
0
)
goto
end
;
ret
=
avformat_open_input
(
&
vobsub
->
sub_ctx
,
sub_name
,
&
ff_mpegps_demuxer
,
NULL
);
ret
=
avformat_open_input
(
&
vobsub
->
sub_ctx
,
sub_name
,
iformat
,
NULL
);
if
(
ret
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Unable to open %s as MPEG subtitles
\n
"
,
sub_name
);
goto
end
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment