diff options
author | Edward Hervey <bilboed@bilboed.com> | 2016-05-15 12:24:03 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2016-05-15 12:25:03 +0200 |
commit | ac3b1cf2ed9fa89a1814dcde133bbd73d597bac7 (patch) | |
tree | 2d9e77bc147b355406bb9db1f829cd5a000a1f81 | |
parent | e9a795fa8bea7aee6fd15b9865744b61b22c2435 (diff) |
matroska-mux: Fix strcmp usage
Just use g_strcmp0 which can handle NULL entries
-rw-r--r-- | gst/matroska/matroska-mux.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 57c48fc3a..9f28024c6 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -3541,14 +3541,13 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, } /* for dirac we have to queue up everything up to a picture unit */ - if (collect_pad->track->codec_id != NULL && - strcmp (collect_pad->track->codec_id, - GST_MATROSKA_CODEC_ID_VIDEO_DIRAC) == 0) { + if (!g_strcmp0 (collect_pad->track->codec_id, + GST_MATROSKA_CODEC_ID_VIDEO_DIRAC)) { buf = gst_matroska_mux_handle_dirac_packet (mux, collect_pad, buf); if (!buf) return GST_FLOW_OK; - } else if (strcmp (collect_pad->track->codec_id, - GST_MATROSKA_CODEC_ID_VIDEO_PRORES) == 0) { + } else if (!g_strcmp0 (collect_pad->track->codec_id, + GST_MATROSKA_CODEC_ID_VIDEO_PRORES)) { /* Remove the 'Frame container atom' header' */ buf = gst_buffer_make_writable (buf); gst_buffer_resize (buf, 8, gst_buffer_get_size (buf) - 8); |