rtpdec_jpeg: Simplify the calculation of the number of qtables
authorMartin Storsjö <martin@martin.st>
Tue, 11 Sep 2012 11:43:10 +0000 (14:43 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 12 Sep 2012 09:09:57 +0000 (12:09 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_jpeg.c

index b1361cd..463bf43 100644 (file)
@@ -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);