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
dcac15a8
Commit
dcac15a8
authored
Mar 28, 2015
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dnxhd: Fix pix_fmt change.
Fixes ticket #4400.
parent
fe57514f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
dnxhddec.c
libavcodec/dnxhddec.c
+5
-4
No files found.
libavcodec/dnxhddec.c
View file @
dcac15a8
...
...
@@ -119,6 +119,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
static
const
uint8_t
header_prefix
[]
=
{
0x00
,
0x00
,
0x02
,
0x80
,
0x01
};
static
const
uint8_t
header_prefix444
[]
=
{
0x00
,
0x00
,
0x02
,
0x80
,
0x02
};
int
i
,
cid
,
ret
;
int
old_bit_depth
=
ctx
->
bit_depth
;
if
(
buf_size
<
0x280
)
{
av_log
(
ctx
->
avctx
,
AV_LOG_ERROR
,
"buffer too small (%d < 640).
\n
"
,
...
...
@@ -145,10 +146,6 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
av_dlog
(
ctx
->
avctx
,
"width %d, height %d
\n
"
,
ctx
->
width
,
ctx
->
height
);
if
(
!
ctx
->
bit_depth
)
{
ff_blockdsp_init
(
&
ctx
->
bdsp
,
ctx
->
avctx
);
ff_idctdsp_init
(
&
ctx
->
idsp
,
ctx
->
avctx
);
}
if
(
buf
[
0x21
]
==
0x58
)
{
/* 10 bit */
ctx
->
bit_depth
=
ctx
->
avctx
->
bits_per_raw_sample
=
10
;
...
...
@@ -172,6 +169,10 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
buf
[
0x21
]);
return
AVERROR_INVALIDDATA
;
}
if
(
ctx
->
bit_depth
!=
old_bit_depth
)
{
ff_blockdsp_init
(
&
ctx
->
bdsp
,
ctx
->
avctx
);
ff_idctdsp_init
(
&
ctx
->
idsp
,
ctx
->
avctx
);
}
cid
=
AV_RB32
(
buf
+
0x28
);
av_dlog
(
ctx
->
avctx
,
"compression id %d
\n
"
,
cid
);
...
...
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