[gegl/video-rejuvenation] ff-load: fix crash on inputs without audio streams



commit e90aa1fb544dee73fe8d4bffe88fc550fbfaccfd
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Nov 7 19:19:10 2015 +0100

    ff-load: fix crash on inputs without audio streams

 operations/external/ff-load.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 3cb84a0..7112e34 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
  *
- * Copyright 2003, 2006 Øyvind Kolås <pippin gimp org>
+ * Copyright 2003, 2006, 2015 Øyvind Kolås <pippin gimp org>
  */
 
 #include "config.h"
@@ -503,7 +503,7 @@ prepare (GeglOperation *operation)
 
       if (o->audio_codec)
         g_free (o->audio_codec);
-      if (p->audio_codec->name)
+      if (p->audio_codec && p->audio_codec->name)
         o->audio_codec = g_strdup (p->audio_codec->name);
       else
         o->audio_codec = g_strdup ("");
@@ -638,7 +638,7 @@ process (GeglOperation       *operation,
 
         long sample_start = 0;
 
-       if (p->audio_stream->codec)
+       if (p->audio_stream && p->audio_stream->codec) // XXX: remove second clause
         {
           o->audio->samplerate = p->audio_stream->codec->sample_rate;
           o->audio->samples = samples_per_frame (o->frame,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]