Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
85e33747
Commit
85e33747
authored
Jan 06, 2004
by
Michael Niedermayer
Browse files
mpeg1 overflowing dc coeff fix
Originally committed as revision 2674 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
af547ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
output_example.c
output_example.c
+7
-2
No files found.
output_example.c
View file @
85e33747
...
...
@@ -197,11 +197,16 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
c
->
frame_rate
=
STREAM_FRAME_RATE
;
c
->
frame_rate_base
=
1
;
c
->
gop_size
=
12
;
/* emit one intra frame every twelve frames at most */
if
(
c
->
codec_id
==
CODEC_ID_MPEG1VIDEO
||
c
->
codec_id
==
CODEC_ID_MPEG2VIDEO
)
{
if
(
c
->
codec_id
==
CODEC_ID_MPEG2VIDEO
)
{
/* just for testing, we also add B frames */
c
->
max_b_frames
=
2
;
}
if
(
c
->
codec_id
==
CODEC_ID_MPEG1VIDEO
){
/* needed to avoid using macroblocks in which some coeffs overflow
this doesnt happen with normal video, it just happens here as the
motion of the chroma plane doesnt match the luma plane */
c
->
mb_decision
=
2
;
}
// some formats want stream headers to be seperate
if
(
!
strcmp
(
oc
->
oformat
->
name
,
"mp4"
)
||
!
strcmp
(
oc
->
oformat
->
name
,
"mov"
)
||
!
strcmp
(
oc
->
oformat
->
name
,
"3gp"
))
c
->
flags
|=
CODEC_FLAG_GLOBAL_HEADER
;
...
...
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