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
b64b1608
Commit
b64b1608
authored
Jan 21, 2012
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pointless and distracting ()
Signed-off-by:
Reimar Döffinger
<
Reimar.Doeffinger@gmx.de
>
parent
57608d90
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
fraps.c
libavcodec/fraps.c
+13
-13
No files found.
libavcodec/fraps.c
View file @
b64b1608
...
@@ -168,15 +168,15 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -168,15 +168,15 @@ static int decode_frame(AVCodecContext *avctx,
/* Fraps v0 is a reordered YUV420 */
/* Fraps v0 is a reordered YUV420 */
avctx
->
pix_fmt
=
PIX_FMT_YUVJ420P
;
avctx
->
pix_fmt
=
PIX_FMT_YUVJ420P
;
if
(
(
buf_size
!=
avctx
->
width
*
avctx
->
height
*
3
/
2
+
header_size
)
&&
if
(
buf_size
!=
avctx
->
width
*
avctx
->
height
*
3
/
2
+
header_size
&&
(
buf_size
!=
header_size
)
)
{
buf_size
!=
header_size
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid frame length %d (should be %d)
\n
"
,
"Invalid frame length %d (should be %d)
\n
"
,
buf_size
,
avctx
->
width
*
avctx
->
height
*
3
/
2
+
header_size
);
buf_size
,
avctx
->
width
*
avctx
->
height
*
3
/
2
+
header_size
);
return
-
1
;
return
-
1
;
}
}
if
(
(
(
avctx
->
width
%
8
)
!=
0
)
||
(
(
avctx
->
height
%
2
)
!=
0
)
)
{
if
(
(
avctx
->
width
%
8
)
!=
0
||
(
avctx
->
height
%
2
)
!=
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid frame size %dx%d
\n
"
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid frame size %dx%d
\n
"
,
avctx
->
width
,
avctx
->
height
);
avctx
->
width
,
avctx
->
height
);
return
-
1
;
return
-
1
;
...
@@ -198,12 +198,12 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -198,12 +198,12 @@ static int decode_frame(AVCodecContext *avctx,
cr
=
(
uint32_t
*
)
&
f
->
data
[
1
][
y
*
f
->
linesize
[
1
]
];
cr
=
(
uint32_t
*
)
&
f
->
data
[
1
][
y
*
f
->
linesize
[
1
]
];
cb
=
(
uint32_t
*
)
&
f
->
data
[
2
][
y
*
f
->
linesize
[
2
]
];
cb
=
(
uint32_t
*
)
&
f
->
data
[
2
][
y
*
f
->
linesize
[
2
]
];
for
(
x
=
0
;
x
<
avctx
->
width
;
x
+=
8
){
for
(
x
=
0
;
x
<
avctx
->
width
;
x
+=
8
){
*
(
luma1
++
)
=
*
(
buf32
++
)
;
*
luma1
++
=
*
buf32
++
;
*
(
luma1
++
)
=
*
(
buf32
++
)
;
*
luma1
++
=
*
buf32
++
;
*
(
luma2
++
)
=
*
(
buf32
++
)
;
*
luma2
++
=
*
buf32
++
;
*
(
luma2
++
)
=
*
(
buf32
++
)
;
*
luma2
++
=
*
buf32
++
;
*
(
cr
++
)
=
*
(
buf32
++
)
;
*
cr
++
=
*
buf32
++
;
*
(
cb
++
)
=
*
(
buf32
++
)
;
*
cb
++
=
*
buf32
++
;
}
}
}
}
}
}
...
@@ -213,8 +213,8 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -213,8 +213,8 @@ static int decode_frame(AVCodecContext *avctx,
/* Fraps v1 is an upside-down BGR24 */
/* Fraps v1 is an upside-down BGR24 */
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
if
(
(
buf_size
!=
avctx
->
width
*
avctx
->
height
*
3
+
header_size
)
&&
if
(
buf_size
!=
avctx
->
width
*
avctx
->
height
*
3
+
header_size
&&
(
buf_size
!=
header_size
)
)
{
buf_size
!=
header_size
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid frame length %d (should be %d)
\n
"
,
"Invalid frame length %d (should be %d)
\n
"
,
buf_size
,
avctx
->
width
*
avctx
->
height
*
3
+
header_size
);
buf_size
,
avctx
->
width
*
avctx
->
height
*
3
+
header_size
);
...
@@ -254,7 +254,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -254,7 +254,7 @@ static int decode_frame(AVCodecContext *avctx,
f
->
key_frame
=
0
;
f
->
key_frame
=
0
;
break
;
break
;
}
}
if
(
(
AV_RL32
(
buf
)
!=
FPS_TAG
)
||
(
buf_size
<
(
planes
*
1024
+
24
))
)
{
if
(
AV_RL32
(
buf
)
!=
FPS_TAG
||
buf_size
<
planes
*
1024
+
24
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Fraps: error in data stream
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Fraps: error in data stream
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -292,7 +292,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -292,7 +292,7 @@ static int decode_frame(AVCodecContext *avctx,
f
->
key_frame
=
0
;
f
->
key_frame
=
0
;
break
;
break
;
}
}
if
(
(
AV_RL32
(
buf
)
!=
FPS_TAG
)
||
(
buf_size
<
(
planes
*
1024
+
24
))
)
{
if
(
AV_RL32
(
buf
)
!=
FPS_TAG
||
buf_size
<
planes
*
1024
+
24
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Fraps: error in data stream
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Fraps: error in data stream
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
...
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