Commit 7520d977 authored by Luca Barbato's avatar Luca Barbato

mjpeg: Move code out of else branch

Simplify the control flow and spare some vertical space.
parent 7798a59d
...@@ -1476,7 +1476,8 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -1476,7 +1476,8 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
av_log(avctx, AV_LOG_ERROR, "MJPEG packet 0x%x too big (0x%x/0x%x), corrupt data?\n", av_log(avctx, AV_LOG_ERROR, "MJPEG packet 0x%x too big (0x%x/0x%x), corrupt data?\n",
start_code, unescaped_buf_size, buf_size); start_code, unescaped_buf_size, buf_size);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} else { }
av_log(avctx, AV_LOG_DEBUG, "marker=%x avail_size_in_buf=%td\n", av_log(avctx, AV_LOG_DEBUG, "marker=%x avail_size_in_buf=%td\n",
start_code, buf_end - buf_ptr); start_code, buf_end - buf_ptr);
...@@ -1620,7 +1621,6 @@ not_the_end: ...@@ -1620,7 +1621,6 @@ not_the_end:
"marker parser used %d bytes (%d bits)\n", "marker parser used %d bytes (%d bits)\n",
(get_bits_count(&s->gb) + 7) / 8, get_bits_count(&s->gb)); (get_bits_count(&s->gb) + 7) / 8, get_bits_count(&s->gb));
} }
}
if (s->got_picture) { if (s->got_picture) {
av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n"); av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n");
goto eoi_parser; goto eoi_parser;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment