codecparsers: jpeg: fix default Huffman tables generation.
authorWind Yuan <feng.yuan@intel.com>
Thu, 13 Jun 2013 05:22:18 +0000 (13:22 +0800)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 21 Jun 2015 10:28:38 +0000 (11:28 +0100)
Fix build_huffman_table() to correctly fill in the associated HUFFVAL
entries to the default Huffman tables.

gst-libs/gst/codecparsers/gstjpegparser.c

index 80de3ff..8ee2d44 100644 (file)
@@ -481,6 +481,7 @@ build_huffman_table (GstJpegHuffmanTable * huf_table,
     huf_table->huf_values[i] = e->value;
     n++;
   }
+  huf_table->huf_bits[j - 1] = n;
 
   for (; j < G_N_ELEMENTS (huf_table->huf_bits); j++)
     huf_table->huf_bits[j] = 0;