OSDN Git Service

Refreshed the text configure spits out, to encourage use of make over jam.
[handbrake-jp/handbrake-jp-git.git] / libhb / common.c
index c8cc8dd..f0ad9e4 100644 (file)
@@ -667,8 +667,13 @@ void hb_filter_close( hb_filter_object_t ** _f )
  *********************************************************************/
 hb_audio_t *hb_audio_copy(const hb_audio_t *src)
 {
-    hb_audio_t *audio = calloc(1, sizeof(*audio));
-    memcpy(audio, src, sizeof(*audio));
+    hb_audio_t *audio = NULL;
+
+    if( src )
+    {
+        audio = calloc(1, sizeof(*audio));
+        memcpy(audio, src, sizeof(*audio));
+    }
     return audio;
 }