[vlc-devel] [PATCH] mp4: assume that blocks have correct i_length by now
Ilkka Ollakka
ileoo at videolan.org
Mon Feb 17 19:54:48 CET 2014
On Mon, Feb 17, 2014 at 08:53:30PM +0200, Ilkka Ollakka wrote:
Seems that mp4 muxer only want 2 blocks so it can fix the lenght,
but I think we could assume that we have length at this point or fix it
in some other place in general way?
> ---
> modules/mux/mp4.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
> diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
> index 51e2b3c..38c0299 100644
> --- a/modules/mux/mp4.c
> +++ b/modules/mux/mp4.c
> @@ -438,7 +438,7 @@ static int Mux(sout_mux_t *p_mux)
> sout_mux_sys_t *p_sys = p_mux->p_sys;
> for (;;) {
> - int i_stream = sout_MuxGetStream(p_mux, 2, NULL);
> + int i_stream = sout_MuxGetStream(p_mux, 1, NULL);
> if (i_stream < 0)
> return(VLC_SUCCESS);
> @@ -455,14 +455,6 @@ static int Mux(sout_mux_t *p_mux)
> } while (!p_data);
> if (p_stream->fmt.i_cat != SPU_ES) {
> - /* Fix length of the sample */
> - if (block_FifoCount(p_input->p_fifo) > 0) {
> - block_t *p_next = block_FifoShow(p_input->p_fifo);
> - int64_t i_diff = p_next->i_dts - p_data->i_dts;
> -
> - if (i_diff < CLOCK_FREQ) /* protection */
> - p_data->i_length = i_diff;
> - }
> if (p_data->i_length <= 0) {
> msg_Warn(p_mux, "i_length <= 0");
> p_stream->i_length_neg += p_data->i_length - 1;
--
Ilkka Ollakka
Beggars should be no choosers.
-- John Heywood
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140217/b13f5980/attachment.sig>
More information about the vlc-devel
mailing list