summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_jpeg.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-09-11 14:43:10 +0300
committerMartin Storsjö <martin@martin.st>2012-09-12 12:09:57 +0300
commita252649059b7dd1fa05e27bd6a14b5a08436456a (patch)
tree86345375749a5f64bea60119a64fc7ff55eb137e /libavformat/rtpdec_jpeg.c
parentcbaa9eeda3c2ca8532b8bf69c9979f30284414ff (diff)
rtpdec_jpeg: Simplify the calculation of the number of qtables
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_jpeg.c')
-rw-r--r--libavformat/rtpdec_jpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index b1361cd164..463bf432e2 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -303,7 +303,7 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
* interchange format. */
jpeg->hdr_size = jpeg_create_header(hdr, sizeof(hdr), type, width,
height, qtables,
- qtable_len > 64 ? 2 : 1);
+ qtable_len / 64);
/* Copy JPEG header to frame buffer. */
avio_write(jpeg->frame, hdr, jpeg->hdr_size);