qtmux: Reserve 256 bytes for CDP packets in pre-fill mode
authorSebastian Dröge <sebastian@centricular.com>
Mon, 30 Jul 2018 10:33:28 +0000 (13:33 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 30 Jul 2018 10:35:02 +0000 (13:35 +0300)
92 is sometimes too small and compared to the wasted space for other
codecs 256 bytes is small (and should be the maximum CDP packet size)

gst/isomp4/gstqtmux.c

index 8aaddf0..e8b19ab 100644 (file)
@@ -996,11 +996,11 @@ gst_qt_mux_prepare_caption_buffer (GstQTPad * qtpad, GstBuffer * buf,
     case FOURCC_c708:
     {
       /* Take the whole CDP */
-      if (in_prefill && size > 92) {
+      if (in_prefill && size > 256) {
         GST_ERROR_OBJECT (qtmux, "Input C708 CDP too big for prefill mode !");
         break;
       }
-      newbuf = gst_buffer_new_and_alloc (in_prefill ? 100 : size + 8);
+      newbuf = gst_buffer_new_and_alloc (in_prefill ? 256 + 8 : size + 8);
 
       /* Let's copy over all metadata and not the memory */
       gst_buffer_copy_into (newbuf, buf, GST_BUFFER_COPY_METADATA, 0, size);