From bbfd76e94e78a49f1ba86ecabd82b1edccd01cee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Aug 2018 12:27:17 +0300 Subject: [PATCH] Revert "qtmux: Allow for CDP packets up to 320 bytes" This reverts commit 5eed1d49bdb7e7a632c7135656c482ed38a6ac2a. 255 is actually the maximum, there's a bug if more is arriving. --- gst/isomp4/gstqtmux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 4867f90..9bf645a 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -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 > 320) { + 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 ? 320 + 8 : 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); @@ -2500,8 +2500,8 @@ prefill_get_sample_size (GstQTMux * qtmux, GstQTPad * qpad) /* We always write both cdat and cdt2 atom in prefill mode */ return 20; case FOURCC_c708: - /* We're cheating a bit by always allocating 320 bytes even if we use less */ - return 320; + /* We're cheating a bit by always allocating 100bytes even if we use less */ + return 100; case FOURCC_sowt: case FOURCC_twos:{ guint64 block_idx; -- 2.7.4