Don't abort when there's no video size.
authorantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 15 Mar 2012 20:43:17 +0000 (20:43 +0000)
committerantognolli <antognolli@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 15 Mar 2012 20:43:17 +0000 (20:43 +0000)
For music, it does make sense to return -1.

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

src/generic_players/vlc/emotion_generic_vlc.c

index 6d61451..f286da3 100644 (file)
@@ -214,7 +214,6 @@ _send_length_changed(struct _App *app, const struct libvlc_event_t *ev)
    float length = ev->u.media_player_length_changed.new_length;
    length /= 1000;
 
-   fprintf(stderr, "length changed: %0.3f\n", length);
    _send_cmd_start(app, EM_RESULT_LENGTH_CHANGED);
    SEND_CMD_PARAM(app, length);
    _send_cmd_finish(app);
@@ -685,7 +684,10 @@ _position_changed(struct _App *app)
    unsigned int w, h;
    r = libvlc_video_get_size(app->mp, 0, &w, &h);
    if (r < 0)
-     return;
+     {
+       w = 1;
+       h = 1;
+     }
    _send_resize(app, w, h);
 
    /* sending audio track info */
@@ -750,8 +752,6 @@ main(int argc, const char *argv[])
    app.em_read = atoi(argv[1]);
    app.em_write = atoi(argv[2]);
 
-   fprintf(stderr, "reading commands from fd: %d, writing on fd: %d\n", app.em_read, app.em_write);
-
    int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
    snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH);
    snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT);