mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
mpegtsmux: Fix a potential unref of a NULL pointer.
At first iteration we don't have any cached SPS/PPS buffer to free.
This commit is contained in:
parent
4d3a965476
commit
d8117471f6
1 changed files with 4 additions and 2 deletions
|
@ -130,8 +130,10 @@ mpegtsmux_process_codec_data_h264 (MpegTsPadData * data, MpegTsMux * mux)
|
|||
|
||||
/* Detect a codec data change */
|
||||
if (h264_data->last_codec_data != data->codec_data) {
|
||||
gst_buffer_unref (h264_data->cached_es);
|
||||
h264_data->cached_es = NULL;
|
||||
if (h264_data->cached_es) {
|
||||
gst_buffer_unref (h264_data->cached_es);
|
||||
h264_data->cached_es = NULL;
|
||||
}
|
||||
ret = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue