Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
56e7865d
Commit
56e7865d
authored
Feb 16, 2012
by
Sébastien Escudier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat : add an option to force a specific format
parent
a71e35fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
modules/demux/avformat/avformat.c
modules/demux/avformat/avformat.c
+4
-0
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+10
-2
No files found.
modules/demux/avformat/avformat.c
View file @
56e7865d
...
...
@@ -32,6 +32,9 @@
#include "avformat.h"
#define FORMAT_TEXT N_( "Format name" )
#define FORMAT_LONGTEXT N_( "Internal libavcodec format name" )
vlc_module_begin
()
#endif
/* MERGE_FFMPEG */
add_shortcut
(
"ffmpeg"
,
"avformat"
)
...
...
@@ -41,6 +44,7 @@ vlc_module_begin ()
set_shortname
(
N_
(
"Avformat"
)
)
set_capability
(
"demux"
,
2
)
set_callbacks
(
OpenDemux
,
CloseDemux
)
add_string
(
"ffmpeg-format"
,
NULL
,
FORMAT_TEXT
,
FORMAT_LONGTEXT
,
true
)
#ifdef ENABLE_SOUT
/* mux submodule */
...
...
modules/demux/avformat/demux.c
View file @
56e7865d
...
...
@@ -112,7 +112,7 @@ int OpenDemux( vlc_object_t *p_this )
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
AVProbeData
pd
;
AVInputFormat
*
fmt
;
AVInputFormat
*
fmt
=
NULL
;
unsigned
int
i
;
int64_t
i_start_time
=
-
1
;
bool
b_can_seek
;
...
...
@@ -141,8 +141,16 @@ int OpenDemux( vlc_object_t *p_this )
av_register_all
();
/* Can be called several times */
vlc_avcodec_unlock
();
char
*
psz_format
=
var_InheritString
(
p_this
,
"ffmpeg-format"
);
if
(
psz_format
)
{
if
(
fmt
=
av_find_input_format
(
psz_format
)
)
msg_Dbg
(
p_demux
,
"forcing format: %s"
,
fmt
->
name
);
free
(
psz_format
);
}
/* Guess format */
if
(
!
(
fmt
=
av_probe_input_format
(
&
pd
,
1
)
)
)
if
(
!
fmt
&&
!
(
fmt
=
av_probe_input_format
(
&
pd
,
1
)
)
)
{
msg_Dbg
(
p_demux
,
"couldn't guess format"
);
free
(
psz_url
);
...
...
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