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
535cb1f3
Commit
535cb1f3
authored
Feb 19, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat mux: use some default values and add debug
parent
9a6659fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
modules/demux/avformat/mux.c
modules/demux/avformat/mux.c
+18
-4
No files found.
modules/demux/avformat/mux.c
View file @
535cb1f3
...
...
@@ -224,16 +224,23 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
codec
->
sample_rate
=
fmt
->
audio
.
i_rate
;
codec
->
time_base
=
(
AVRational
){
1
,
codec
->
sample_rate
};
codec
->
frame_size
=
fmt
->
audio
.
i_frame_length
;
if
(
fmt
->
i_bitrate
==
0
)
{
msg_Warn
(
p_mux
,
"Missing audio bitrate, assuming 64k"
);
fmt
->
i_bitrate
=
64000
;
}
break
;
case
VIDEO_ES
:
if
(
!
fmt
->
video
.
i_frame_rate
||
!
fmt
->
video
.
i_frame_rate_base
)
{
if
(
!
fmt
->
video
.
i_frame_rate
||
!
fmt
->
video
.
i_frame_rate_base
)
{
msg_Warn
(
p_mux
,
"Missing frame rate, assuming 25fps"
);
fmt
->
video
.
i_frame_rate
=
25
;
fmt
->
video
.
i_frame_rate_base
=
1
;
}
}
else
msg_Dbg
(
p_mux
,
"Muxing framerate will be %d/%d = %.2f fps"
,
fmt
->
video
.
i_frame_rate
,
fmt
->
video
.
i_frame_rate_base
,
(
double
)
fmt
->
video
.
i_frame_rate
/
(
double
)
fmt
->
video
.
i_frame_rate_base
);
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
codec
->
width
=
fmt
->
video
.
i_width
;
codec
->
height
=
fmt
->
video
.
i_height
;
...
...
@@ -241,10 +248,17 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
&
codec
->
sample_aspect_ratio
.
den
,
fmt
->
video
.
i_sar_num
,
fmt
->
video
.
i_sar_den
,
1
<<
30
/* something big */
);
msg_Dbg
(
p_mux
,
"Muxing aspect ratio will be %d/%d"
,
fmt
->
video
.
i_sar_num
,
fmt
->
video
.
i_sar_den
);
stream
->
sample_aspect_ratio
.
den
=
codec
->
sample_aspect_ratio
.
den
;
stream
->
sample_aspect_ratio
.
num
=
codec
->
sample_aspect_ratio
.
num
;
codec
->
time_base
.
den
=
fmt
->
video
.
i_frame_rate
;
codec
->
time_base
.
num
=
fmt
->
video
.
i_frame_rate_base
;
if
(
fmt
->
i_bitrate
==
0
)
{
msg_Warn
(
p_mux
,
"Missing video bitrate, assuming 512k"
);
fmt
->
i_bitrate
=
512000
;
}
else
msg_Dbg
(
p_mux
,
"Muxing video bitrate will be %d"
,
fmt
->
i_bitrate
);
break
;
}
...
...
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