History

lavc/8bps: fix exporting palette after 63767b79a570404628b2521b83104108b7b6884c

It would be left empty on each frame whose packet does not come with palette attached.

Anton Khirnov committed 3 years ago

Commit 6dbde681 parent 72821371 file · +5 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/8bps.c+5−1
@@ -43,6 +43,8 @@ typedef struct EightBpsContext { · 42 unmodified lines
43 43
44 uint8_t planes;44 uint8_t planes;
45 uint8_t planemap[4];45 uint8_t planemap[4];
46
47 uint32_t pal[256];
46} EightBpsContext;48} EightBpsContext;
47 49
48static int decode_frame(AVCodecContext *avctx, AVFrame *frame,50static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
@@ -116,10 +118,12 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 67 unmodified lines
116FF_DISABLE_DEPRECATION_WARNINGS118FF_DISABLE_DEPRECATION_WARNINGS
117 frame->palette_has_changed =119 frame->palette_has_changed =
118#endif120#endif
119 ff_copy_palette(frame->data[1], avpkt, avctx);121 ff_copy_palette(c->pal, avpkt, avctx);
120#if FF_API_PALETTE_HAS_CHANGED122#if FF_API_PALETTE_HAS_CHANGED
121FF_ENABLE_DEPRECATION_WARNINGS123FF_ENABLE_DEPRECATION_WARNINGS
122#endif124#endif
125
126 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
123 }127 }
124 128
125 *got_frame = 1;129 *got_frame = 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t