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
b86ba370
Commit
b86ba370
authored
Feb 16, 2016
by
Mats Peterson
Committed by
Michael Niedermayer
Feb 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/rawdec: Retrieve nut palette from packets
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
d0962160
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
rawdec.c
libavcodec/rawdec.c
+7
-1
No files found.
libavcodec/rawdec.c
View file @
b86ba370
...
...
@@ -384,7 +384,6 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_PAL8
)
{
const
uint8_t
*
pal
=
av_packet_get_side_data
(
avpkt
,
AV_PKT_DATA_PALETTE
,
NULL
);
if
(
pal
)
{
av_buffer_unref
(
&
context
->
palette
);
context
->
palette
=
av_buffer_alloc
(
AVPALETTE_SIZE
);
...
...
@@ -394,6 +393,13 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
}
memcpy
(
context
->
palette
->
data
,
pal
,
AVPALETTE_SIZE
);
frame
->
palette_has_changed
=
1
;
}
else
if
(
context
->
is_nut_pal8
)
{
int
vid_size
=
avctx
->
width
*
avctx
->
height
;
if
(
avpkt
->
size
-
vid_size
)
{
pal
=
avpkt
->
data
+
vid_size
;
memcpy
(
context
->
palette
->
data
,
pal
,
avpkt
->
size
-
vid_size
);
frame
->
palette_has_changed
=
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