[vlc-commits] [Git][videolan/vlc][master] mux: mp4: fix conversion regression
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Fri Dec 8 18:37:00 UTC 2023
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
a69e4c32 by François Cartegnie at 2023-12-08T17:03:25+00:00
mux: mp4: fix conversion regression
regression by ad08ac23151d82c5eceec15db17b2e6d2b366758
- - - - -
1 changed file:
- modules/mux/mp4/mp4.c
Changes:
=====================================
modules/mux/mp4/mp4.c
=====================================
@@ -604,16 +604,10 @@ static bool CreateCurrentEdit(mp4_stream_t *p_stream, vlc_tick_t i_mux_start_dts
return mp4mux_track_AddEdit(p_stream->tinfo, &newedit);
}
-static int BlockDequeue(sout_input_t *p_input, mp4_stream_t *p_stream, block_t **out)
+static int BlockConvert(mp4_stream_t *p_stream, block_t **out)
{
assert(out);
-
- block_t *p_block = block_FifoGet(p_input->p_fifo);
- if(unlikely(!p_block))
- {
- *out = NULL;
- return VLC_SUCCESS;
- }
+ block_t *p_block = *out;
/* Create on the fly extradata as packetizer is not in the loop */
if(p_stream->extrabuilder && !mp4mux_track_HasSamplePriv(p_stream->tinfo))
@@ -892,6 +886,13 @@ static int Mux(sout_mux_t *p_mux)
if (unlikely(p_data == NULL))
continue;
+ int ret = BlockConvert(p_stream, &p_data);
+ if (ret != VLC_SUCCESS)
+ return ret;
+
+ if (unlikely(p_data == NULL))
+ continue;
+
i_ret = MuxStream(p_mux, p_input, p_stream, p_data);
} while( i_ret == VLC_SUCCESS );
@@ -1469,8 +1470,11 @@ static int MuxFrag(sout_mux_t *p_mux)
sout_input_t *p_input = p_mux->pp_inputs[i_stream];
mp4_stream_t *p_stream = (mp4_stream_t*) p_input->p_sys;
- block_t *p_currentblock;
- int ret = BlockDequeue(p_input, p_stream, &p_currentblock);
+ block_t *p_currentblock = block_FifoGet(p_input->p_fifo);
+ if(unlikely(!p_currentblock))
+ return VLC_EGENERIC;
+
+ int ret = BlockConvert(p_stream, &p_currentblock);
if (ret != VLC_SUCCESS)
return ret;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a69e4c3298dbfa6b61e17fdfc99604ec0db0df8e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a69e4c3298dbfa6b61e17fdfc99604ec0db0df8e
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list