Commit a2526490 authored by Martin Storsjö's avatar Martin Storsjö

rtpdec_jpeg: Simplify the calculation of the number of qtables

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent cbaa9eed
...@@ -303,7 +303,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg, ...@@ -303,7 +303,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
* interchange format. */ * interchange format. */
jpeg->hdr_size = jpeg_create_header(hdr, sizeof(hdr), type, width, jpeg->hdr_size = jpeg_create_header(hdr, sizeof(hdr), type, width,
height, qtables, height, qtables,
qtable_len > 64 ? 2 : 1); qtable_len / 64);
/* Copy JPEG header to frame buffer. */ /* Copy JPEG header to frame buffer. */
avio_write(jpeg->frame, hdr, jpeg->hdr_size); avio_write(jpeg->frame, hdr, jpeg->hdr_size);
......
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