Speeds up next marker search when a SOS marker is found but the frame is discarded (which happens in avformat_find_stream_info).
Unified · Split
| @@ -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)) |