mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
mpegtsmux: restore stream creation order
In 7c767f3fcd
, stream creation was
refactored to occur before potential program creation. This created
issues with pipelines such as:
gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=640, framerate=25/1 ! \
x264enc ! hlssink2 target-duration=1
eg.: gst_buffer_copy_into: assertion 'bufsize >= offset + size' failed
As this reordering was actually not needed for the purpose of allowing
to specify a PCR stream, this reverts the reordering part of the
initial commit.
This commit is contained in:
parent
a751b33072
commit
91c76b0851
1 changed files with 6 additions and 7 deletions
|
@ -878,6 +878,7 @@ mpegtsmux_create_stream (MpegTsMux * mux, MpegTsPadData * ts_data)
|
|||
ts_data->stream->opus_channel_config_code = opus_channel_config_code;
|
||||
|
||||
tsmux_stream_set_buffer_release_func (ts_data->stream, release_buffer_cb);
|
||||
tsmux_program_add_stream (ts_data->prog, ts_data->stream);
|
||||
|
||||
ret = GST_FLOW_OK;
|
||||
}
|
||||
|
@ -956,12 +957,6 @@ mpegtsmux_create_streams (MpegTsMux * mux)
|
|||
}
|
||||
}
|
||||
|
||||
if (ts_data->stream == NULL) {
|
||||
ret = mpegtsmux_create_stream (mux, ts_data);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto no_stream;
|
||||
}
|
||||
|
||||
ts_data->prog =
|
||||
g_hash_table_lookup (mux->programs, GINT_TO_POINTER (ts_data->prog_id));
|
||||
if (ts_data->prog == NULL) {
|
||||
|
@ -980,7 +975,11 @@ mpegtsmux_create_streams (MpegTsMux * mux)
|
|||
tsmux_program_set_pcr_stream (ts_data->prog, ts_data->stream);
|
||||
}
|
||||
|
||||
tsmux_program_add_stream (ts_data->prog, ts_data->stream);
|
||||
if (ts_data->stream == NULL) {
|
||||
ret = mpegtsmux_create_stream (mux, ts_data);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto no_stream;
|
||||
}
|
||||
|
||||
/* Check for user-specified PCR PID */
|
||||
pcr_name = g_strdup_printf ("PCR_%d", ts_data->prog->pgm_number);
|
||||
|
|
Loading…
Reference in a new issue