emotion/generic: Reset initial values on file_set.
authorantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 5 Sep 2011 16:07:06 +0000 (16:07 +0000)
committerantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 5 Sep 2011 16:07:06 +0000 (16:07 +0000)
These values need to be reset as soon as a new file is set, otherwise
they can give wrong information to evas about the size of pixels to
render.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/emotion@63205 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/generic/emotion_generic.c

index de2b726..3a635a2 100644 (file)
@@ -198,11 +198,6 @@ static void
 _file_open(Emotion_Generic_Video *ev)
 {
    INF("Opening file: %s", ev->filename);
-   ev->w = DEFAULTWIDTH;
-   ev->h = DEFAULTHEIGHT;
-   ev->ratio = (double)DEFAULTWIDTH / DEFAULTHEIGHT;
-   ev->speed = 1.0;
-   ev->len = 0;
    ev->drop = 0;
 
    if (!ev->ready)
@@ -780,6 +775,11 @@ em_file_open(const char *file, Evas_Object *obj __UNUSED__, void *data)
    eina_stringshare_replace(&ev->filename, file);
 
    ev->pos = 0;
+   ev->w = 0;
+   ev->h = 0;
+   ev->ratio = 1;
+   ev->speed = 1.0;
+   ev->len = 0;
 
    if (ev->ready && ev->opening)
      {