History

avcodec/gif_parser: split correctly also bitstreams that do not have extension blocks

Paul B Mahol committed 3 years ago

Commit 10440a41 parent 553b31d1 file · +11 −0Browse files

Unified · Split

libavcodec/gif_parser.c+11−0
@@ -67,6 +67,17 @@ static int gif_find_frame_end(GIFParseContext *g, const uint8_t *buf, · 66 unmodified lines
67 g->state = GIF_EXTENSION;67 g->state = GIF_EXTENSION;
68 g->found_start = pc->frame_start_found = 1;68 g->found_start = pc->frame_start_found = 1;
69 } else if (buf[index] == GIF_IMAGE_SEPARATOR) {69 } else if (buf[index] == GIF_IMAGE_SEPARATOR) {
70 if (g->state != GIF_EXTENSION_BLOCK && g->found_start &&
71 g->found_end && g->found_sig) {
72 next = index;
73 g->found_start = pc->frame_start_found = 1;
74 g->found_end = 0;
75 g->index = 0;
76 g->gct_flag = 0;
77 g->gct_size = 0;
78 g->state = GIF_IMAGE;
79 break;
80 }
70 g->state = GIF_IMAGE;81 g->state = GIF_IMAGE;
71 } else if (buf[index] == GIF_TRAILER) {82 } else if (buf[index] == GIF_TRAILER) {
72 g->state = 0;83 g->state = 0;

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