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
60c2cddf
Commit
60c2cddf
authored
Dec 04, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use the correct variables in do_video_stats()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e98fab13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
ffmpeg.c
ffmpeg.c
+2
-4
No files found.
ffmpeg.c
View file @
60c2cddf
...
...
@@ -958,14 +958,14 @@ static void do_video_stats(OutputStream *ost, int frame_size)
enc
=
ost
->
st
->
codec
;
if
(
enc
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
frame_number
=
ost
->
frame_number
;
frame_number
=
ost
->
st
->
nb_frames
;
fprintf
(
vstats_file
,
"frame= %5d q= %2.1f "
,
frame_number
,
enc
->
coded_frame
->
quality
/
(
float
)
FF_QP2LAMBDA
);
if
(
enc
->
flags
&
CODEC_FLAG_PSNR
)
fprintf
(
vstats_file
,
"PSNR= %6.2f "
,
psnr
(
enc
->
coded_frame
->
error
[
0
]
/
(
enc
->
width
*
enc
->
height
*
255
.
0
*
255
.
0
)));
fprintf
(
vstats_file
,
"f_size= %6d "
,
frame_size
);
/* compute pts value */
ti1
=
ost
->
s
ync_opts
*
av_q2d
(
enc
->
time_base
);
ti1
=
ost
->
s
t
->
pts
.
val
*
av_q2d
(
enc
->
time_base
);
if
(
ti1
<
0
.
01
)
ti1
=
0
.
01
;
...
...
@@ -1304,8 +1304,6 @@ static void flush_encoders(void)
if
(
pkt
.
duration
>
0
)
pkt
.
duration
=
av_rescale_q
(
pkt
.
duration
,
enc
->
time_base
,
ost
->
st
->
time_base
);
write_frame
(
os
,
&
pkt
,
ost
);
ost
->
frame_number
++
;
ost
->
sync_opts
++
;
if
(
ost
->
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
&&
vstats_filename
)
{
do_video_stats
(
ost
,
pkt
.
size
);
}
...
...
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