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
2247 goto the_end;2247 goto the_end;
2248 case SOS:2248 case SOS:
2249 s->cur_scan++;2249 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));
2251 break;2252 break;
2253 }
2252 2254
2253 if ((ret = ff_mjpeg_decode_sos(s, NULL, 0, NULL)) < 0 &&2255 if ((ret = ff_mjpeg_decode_sos(s, NULL, 0, NULL)) < 0 &&
2254 (avctx->err_recognition & AV_EF_EXPLODE))2256 (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