Don't set sd->video to NULL. sd->video is initialized only when
authordoursse <doursse>
Wed, 14 May 2008 21:39:33 +0000 (21:39 +0000)
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 14 May 2008 21:39:33 +0000 (21:39 +0000)
emotion_object_init() is called. Hence, setting sd->video to NULL
there implied that the code:

emotion_object_init(o, module);
emotion_object_file_set(o, file1);
emotion_object_file_set(o, NULL);
emotion_object_file_set(o, file2);

seg fault.

(such code is useful when you want to reset the same stream
(file1 = file2). The other solution would be to destroy everything
and recreating the pipeline, which is not nice)

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/emotion@34571 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/emotion_smart.c

index 1fcdc9a..a1bc7e9 100644 (file)
@@ -254,7 +254,6 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
         if (sd->video && sd->module)
          {
             sd->module->file_close(sd->video);
-            sd->video = NULL;
             evas_object_image_size_set(sd->obj, 0, 0);
          }
      }