[09/13] rtpdec_jpeg: Simplify the calculation of the number of qtables

Message ID 1347363979-4676-9-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö Sept. 11, 2012, 11:46 a.m.
---
 libavformat/rtpdec_jpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index b1361cd..c9c7f72 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);