Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
0949bbc4
Commit
0949bbc4
authored
Jun 01, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: fix for-muxer AVCodecContext stuff
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0949ff93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
ffmpeg.c
ffmpeg.c
+9
-8
No files found.
ffmpeg.c
View file @
0949bbc4
...
...
@@ -845,6 +845,7 @@ static void do_video_out(AVFormatContext *s,
int
ret
,
format_video_sync
;
AVPacket
pkt
;
AVCodecContext
*
enc
=
ost
->
enc_ctx
;
AVCodecContext
*
mux_enc
=
ost
->
st
->
codec
;
int
nb_frames
,
i
;
double
sync_ipts
,
delta
;
double
duration
=
0
;
...
...
@@ -945,12 +946,12 @@ static void do_video_out(AVFormatContext *s,
/* raw pictures are written as AVPicture structure to
avoid any copies. We support temporarily the older
method. */
enc
->
coded_frame
->
interlaced_frame
=
in_picture
->
interlaced_frame
;
enc
->
coded_frame
->
top_field_first
=
in_picture
->
top_field_first
;
if
(
enc
->
coded_frame
->
interlaced_frame
)
enc
->
field_order
=
enc
->
coded_frame
->
top_field_first
?
AV_FIELD_TB
:
AV_FIELD_BT
;
mux_
enc
->
coded_frame
->
interlaced_frame
=
in_picture
->
interlaced_frame
;
mux_
enc
->
coded_frame
->
top_field_first
=
in_picture
->
top_field_first
;
if
(
mux_
enc
->
coded_frame
->
interlaced_frame
)
mux_enc
->
field_order
=
mux_
enc
->
coded_frame
->
top_field_first
?
AV_FIELD_TB
:
AV_FIELD_BT
;
else
enc
->
field_order
=
AV_FIELD_PROGRESSIVE
;
mux_
enc
->
field_order
=
AV_FIELD_PROGRESSIVE
;
pkt
.
data
=
(
uint8_t
*
)
in_picture
;
pkt
.
size
=
sizeof
(
AVPicture
);
pkt
.
pts
=
av_rescale_q
(
in_picture
->
pts
,
enc
->
time_base
,
ost
->
st
->
time_base
);
...
...
@@ -967,11 +968,11 @@ static void do_video_out(AVFormatContext *s,
if
(
in_picture
->
interlaced_frame
)
{
if
(
enc
->
codec
->
id
==
AV_CODEC_ID_MJPEG
)
enc
->
field_order
=
in_picture
->
top_field_first
?
AV_FIELD_TT
:
AV_FIELD_BB
;
mux_
enc
->
field_order
=
in_picture
->
top_field_first
?
AV_FIELD_TT
:
AV_FIELD_BB
;
else
enc
->
field_order
=
in_picture
->
top_field_first
?
AV_FIELD_TB
:
AV_FIELD_BT
;
mux_
enc
->
field_order
=
in_picture
->
top_field_first
?
AV_FIELD_TB
:
AV_FIELD_BT
;
}
else
enc
->
field_order
=
AV_FIELD_PROGRESSIVE
;
mux_
enc
->
field_order
=
AV_FIELD_PROGRESSIVE
;
in_picture
->
quality
=
enc
->
global_quality
;
if
(
!
enc
->
me_threshold
)
...
...
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