History

lavc/mjpegdec: consume SOS data even if the frame is discarded

Speeds up next marker search when a SOS marker is found but the frame is discarded (which happens in avformat_find_stream_info).

Matthieu Bouron committed 9 years ago

Commit 2ae82781 parent 383057f1 file · +3 −1Browse files

Unified · Split

libavcodec/mjpegdec.c+3−1
@@ -2247,8 +2247,10 @@ eoi_parser: · 2246 unmodified lines
22472247 goto the_end;
22482248 case SOS:
22492249 s->cur_scan++;
2250− if (avctx->skip_frame == AVDISCARD_ALL)
2250+ if (avctx->skip_frame == AVDISCARD_ALL) {
2251+ skip_bits(&s->gb, get_bits_left(&s->gb));
22512252 break;
2253+ }
22522254
22532255 if ((ret = ff_mjpeg_decode_sos(s, NULL, 0, NULL)) < 0 &&
22542256 (avctx->err_recognition & AV_EF_EXPLODE))

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