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
41e03e28
Commit
41e03e28
authored
Jan 27, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNxHD: More verbose error messages
parent
1279221c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
dnxhddec.c
libavcodec/dnxhddec.c
+9
-3
No files found.
libavcodec/dnxhddec.c
View file @
41e03e28
...
...
@@ -110,8 +110,11 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
static
const
uint8_t
header_prefix444
[]
=
{
0x00
,
0x00
,
0x02
,
0x80
,
0x02
};
int
i
,
cid
,
ret
;
if
(
buf_size
<
0x280
)
if
(
buf_size
<
0x280
)
{
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"buffer too small (%d < 640).
\n
"
,
buf_size
);
return
AVERROR_INVALIDDATA
;
}
if
(
memcmp
(
buf
,
header_prefix
,
5
)
&&
memcmp
(
buf
,
header_prefix444
,
5
))
{
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"error in header
\n
"
);
...
...
@@ -168,7 +171,8 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
return
ret
;
if
(
buf_size
<
ctx
->
cid_table
->
coding_unit_size
)
{
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"incorrect frame size
\n
"
);
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"incorrect frame size (%d < %d).
\n
"
,
buf_size
,
ctx
->
cid_table
->
coding_unit_size
);
return
AVERROR_INVALIDDATA
;
}
...
...
@@ -192,7 +196,9 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
ctx
->
mb_scan_index
[
i
]
=
AV_RB32
(
buf
+
0x170
+
(
i
<<
2
));
av_dlog
(
ctx
->
avctx
,
"mb scan index %d
\n
"
,
ctx
->
mb_scan_index
[
i
]);
if
(
buf_size
<
ctx
->
mb_scan_index
[
i
]
+
0x280
)
{
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"invalid mb scan index
\n
"
);
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"invalid mb scan index (%d < %d).
\n
"
,
buf_size
,
ctx
->
mb_scan_index
[
i
]
+
0x280
);
return
AVERROR_INVALIDDATA
;
}
}
...
...
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