Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
3a86d3f6
Commit
3a86d3f6
authored
May 13, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
factorize av_set_pts_info
Originally committed as revision 18808 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1fbbedff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
movenc.c
libavformat/movenc.c
+2
-3
No files found.
libavformat/movenc.c
View file @
3a86d3f6
...
@@ -1758,7 +1758,6 @@ static int mov_write_header(AVFormatContext *s)
...
@@ -1758,7 +1758,6 @@ static int mov_write_header(AVFormatContext *s)
track
->
height
=
track
->
tag
>>
24
==
'n'
?
486
:
576
;
track
->
height
=
track
->
tag
>>
24
==
'n'
?
486
:
576
;
}
}
track
->
timescale
=
st
->
codec
->
time_base
.
den
;
track
->
timescale
=
st
->
codec
->
time_base
.
den
;
av_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
time_base
.
den
);
if
(
track
->
mode
==
MODE_MOV
&&
track
->
timescale
>
100000
)
if
(
track
->
mode
==
MODE_MOV
&&
track
->
timescale
>
100000
)
av_log
(
s
,
AV_LOG_WARNING
,
av_log
(
s
,
AV_LOG_WARNING
,
"WARNING codec timebase is very high. If duration is too long,
\n
"
"WARNING codec timebase is very high. If duration is too long,
\n
"
...
@@ -1766,7 +1765,6 @@ static int mov_write_header(AVFormatContext *s)
...
@@ -1766,7 +1765,6 @@ static int mov_write_header(AVFormatContext *s)
"or choose different container.
\n
"
);
"or choose different container.
\n
"
);
}
else
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_AUDIO
){
}
else
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_AUDIO
){
track
->
timescale
=
st
->
codec
->
sample_rate
;
track
->
timescale
=
st
->
codec
->
sample_rate
;
av_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
sample_rate
);
if
(
!
st
->
codec
->
frame_size
&&
!
av_get_bits_per_sample
(
st
->
codec
->
codec_id
))
{
if
(
!
st
->
codec
->
frame_size
&&
!
av_get_bits_per_sample
(
st
->
codec
->
codec_id
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"track %d: codec frame size is not set
\n
"
,
i
);
av_log
(
s
,
AV_LOG_ERROR
,
"track %d: codec frame size is not set
\n
"
,
i
);
goto
error
;
goto
error
;
...
@@ -1784,10 +1782,11 @@ static int mov_write_header(AVFormatContext *s)
...
@@ -1784,10 +1782,11 @@ static int mov_write_header(AVFormatContext *s)
}
}
}
else
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_SUBTITLE
){
}
else
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_SUBTITLE
){
track
->
timescale
=
st
->
codec
->
time_base
.
den
;
track
->
timescale
=
st
->
codec
->
time_base
.
den
;
av_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
time_base
.
den
);
}
}
if
(
!
track
->
height
)
if
(
!
track
->
height
)
track
->
height
=
st
->
codec
->
height
;
track
->
height
=
st
->
codec
->
height
;
av_set_pts_info
(
st
,
64
,
1
,
track
->
timescale
);
}
}
mov_write_mdat_tag
(
pb
,
mov
);
mov_write_mdat_tag
(
pb
,
mov
);
...
...
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