flvmux: Simplify an if-else chain
Merge the identical branches and turn the condition around to make it easier to read.
This commit is contained in:
parent
9a70ce87db
commit
9528bfd78f
@ -1478,14 +1478,7 @@ gst_flv_mux_write_header (GstFlvMux * mux)
|
|||||||
gst_query_unref (query);
|
gst_query_unref (query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mux->streamable) {
|
if (mux->streamable && mux->sent_header) {
|
||||||
caps = gst_flv_mux_prepare_src_caps (mux,
|
|
||||||
&header, &metadata, &video_codec_data, &audio_codec_data);
|
|
||||||
} else {
|
|
||||||
if (!mux->sent_header) {
|
|
||||||
caps = gst_flv_mux_prepare_src_caps (mux,
|
|
||||||
&header, &metadata, &video_codec_data, &audio_codec_data);
|
|
||||||
} else {
|
|
||||||
GstBuffer **video_codec_data_p = NULL, **audio_codec_data_p = NULL;
|
GstBuffer **video_codec_data_p = NULL, **audio_codec_data_p = NULL;
|
||||||
|
|
||||||
if (mux->video_pad && mux->video_pad->info_changed)
|
if (mux->video_pad && mux->video_pad->info_changed)
|
||||||
@ -1495,7 +1488,9 @@ gst_flv_mux_write_header (GstFlvMux * mux)
|
|||||||
|
|
||||||
caps = gst_flv_mux_prepare_src_caps (mux,
|
caps = gst_flv_mux_prepare_src_caps (mux,
|
||||||
NULL, NULL, video_codec_data_p, audio_codec_data_p);
|
NULL, NULL, video_codec_data_p, audio_codec_data_p);
|
||||||
}
|
} else {
|
||||||
|
caps = gst_flv_mux_prepare_src_caps (mux,
|
||||||
|
&header, &metadata, &video_codec_data, &audio_codec_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_aggregator_set_src_caps (GST_AGGREGATOR_CAST (mux), caps);
|
gst_aggregator_set_src_caps (GST_AGGREGATOR_CAST (mux), caps);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user