gst/matroska/matroska-mux.c: Fix NULL pointer dereference of an unset codec_id in...
authorJan Schmidt <thaytan@mad.scientist.com>
Thu, 20 Nov 2008 14:30:40 +0000 (14:30 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Thu, 20 Nov 2008 14:30:40 +0000 (14:30 +0000)
Original commit message from CVS:
* gst/matroska/matroska-mux.c:
Fix NULL pointer dereference of an unset codec_id in the recently
added Dirac paths

ChangeLog
gst/matroska/matroska-mux.c

index 0c013a6..8a894bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-11-20  Jan Schmidt  <jan.schmidt@sun.com>
 
+       * gst/matroska/matroska-mux.c:
+       Fix NULL pointer dereference of an unset codec_id in the recently 
+       added Dirac paths
+
+2008-11-20  Jan Schmidt  <jan.schmidt@sun.com>
+
        * tests/check/Makefile.am:
        Just keep disabling elements that hang the states test until it
        works.
index 866157f..97c4333 100644 (file)
@@ -2099,7 +2099,8 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
   }
 
   /* for dirac we have to queue up everything up to a picture unit */
-  if (strcmp (collect_pad->track->codec_id,
+  if (collect_pad->track->codec_id != NULL &&
+      strcmp (collect_pad->track->codec_id,
           GST_MATROSKA_CODEC_ID_VIDEO_DIRAC) == 0) {
     buf = gst_matroska_mux_handle_dirac_packet (mux, collect_pad, buf);
     if (!buf)