Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
a14c0824
Commit
a14c0824
authored
Apr 25, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flashsv: Return more meaningful error values.
parent
46cb2da1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
flashsv.c
libavcodec/flashsv.c
+1
-1
flashsvenc.c
libavcodec/flashsvenc.c
+3
-3
No files found.
libavcodec/flashsv.c
View file @
a14c0824
...
@@ -133,7 +133,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -133,7 +133,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
av_free
(
s
->
tmpblock
);
av_free
(
s
->
tmpblock
);
if
((
s
->
tmpblock
=
av_malloc
(
3
*
s
->
block_width
*
s
->
block_height
))
==
NULL
)
{
if
((
s
->
tmpblock
=
av_malloc
(
3
*
s
->
block_width
*
s
->
block_height
))
==
NULL
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Can't allocate decompression buffer.
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Can't allocate decompression buffer.
\n
"
);
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
}
}
}
}
s
->
block_size
=
s
->
block_width
*
s
->
block_height
;
s
->
block_size
=
s
->
block_width
*
s
->
block_height
;
...
...
libavcodec/flashsvenc.c
View file @
a14c0824
...
@@ -106,7 +106,7 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
...
@@ -106,7 +106,7 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
if
((
avctx
->
width
>
4095
)
||
(
avctx
->
height
>
4095
))
{
if
((
avctx
->
width
>
4095
)
||
(
avctx
->
height
>
4095
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Input dimensions too large, input must be max 4096x4096 !
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Input dimensions too large, input must be max 4096x4096 !
\n
"
);
return
-
1
;
return
AVERROR_INVALIDDATA
;
}
}
// Needed if zlib unused or init aborted before deflateInit
// Needed if zlib unused or init aborted before deflateInit
...
@@ -122,7 +122,7 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
...
@@ -122,7 +122,7 @@ static av_cold int flashsv_encode_init(AVCodecContext *avctx)
if
(
!
s
->
tmpblock
||
!
s
->
encbuffer
)
{
if
(
!
s
->
tmpblock
||
!
s
->
encbuffer
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Memory allocation failed.
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Memory allocation failed.
\n
"
);
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
}
}
return
0
;
return
0
;
...
@@ -222,7 +222,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf,
...
@@ -222,7 +222,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf,
s
->
previous_frame
=
av_mallocz
(
FFABS
(
p
->
linesize
[
0
])
*
s
->
image_height
);
s
->
previous_frame
=
av_mallocz
(
FFABS
(
p
->
linesize
[
0
])
*
s
->
image_height
);
if
(
!
s
->
previous_frame
)
{
if
(
!
s
->
previous_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Memory allocation failed.
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Memory allocation failed.
\n
"
);
return
-
1
;
return
AVERROR
(
ENOMEM
)
;
}
}
I_frame
=
1
;
I_frame
=
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