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
04916953
Commit
04916953
authored
Oct 24, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avdevice/fbdev_enc: avoid declaring variables in for()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
426abbb6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fbdev_enc.c
libavdevice/fbdev_enc.c
+4
-2
No files found.
libavdevice/fbdev_enc.c
View file @
04916953
...
...
@@ -47,8 +47,9 @@ static av_cold int fbdev_write_header(AVFormatContext *h)
enum
AVPixelFormat
pix_fmt
;
AVStream
*
st
=
NULL
;
int
ret
,
flags
=
O_RDWR
;
int
i
;
for
(
i
nt
i
=
0
;
i
<
h
->
nb_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
h
->
nb_streams
;
i
++
)
{
if
(
h
->
streams
[
i
]
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
if
(
!
st
)
{
fbdev
->
index
=
i
;
...
...
@@ -117,6 +118,7 @@ static int fbdev_write_packet(AVFormatContext *h, AVPacket *pkt)
int
video_height
=
codec_ctx
->
height
;
int
bytes_per_pixel
=
((
codec_ctx
->
bits_per_coded_sample
+
7
)
>>
3
);
int
src_line_size
=
video_width
*
bytes_per_pixel
;
int
i
;
if
(
fbdev
->
index
!=
pkt
->
stream_index
)
return
0
;
...
...
@@ -175,7 +177,7 @@ static int fbdev_write_packet(AVFormatContext *h, AVPacket *pkt)
}
}
for
(
i
nt
i
=
0
;
i
<
disp_height
;
i
++
)
{
for
(
i
=
0
;
i
<
disp_height
;
i
++
)
{
memcpy
(
pout
,
pin
,
bytes_to_copy
);
pout
+=
fbdev
->
fixinfo
.
line_length
;
pin
+=
src_line_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