forked from enlightenment/efl
Don't abort when there's no video size.
For music, it does make sense to return -1. SVN revision: 69436
This commit is contained in:
parent
7248d7a970
commit
ddb6b7aab2
|
@ -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;
|
float length = ev->u.media_player_length_changed.new_length;
|
||||||
length /= 1000;
|
length /= 1000;
|
||||||
|
|
||||||
fprintf(stderr, "length changed: %0.3f\n", length);
|
|
||||||
_send_cmd_start(app, EM_RESULT_LENGTH_CHANGED);
|
_send_cmd_start(app, EM_RESULT_LENGTH_CHANGED);
|
||||||
SEND_CMD_PARAM(app, length);
|
SEND_CMD_PARAM(app, length);
|
||||||
_send_cmd_finish(app);
|
_send_cmd_finish(app);
|
||||||
|
@ -685,7 +684,10 @@ _position_changed(struct _App *app)
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
r = libvlc_video_get_size(app->mp, 0, &w, &h);
|
r = libvlc_video_get_size(app->mp, 0, &w, &h);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return;
|
{
|
||||||
|
w = 1;
|
||||||
|
h = 1;
|
||||||
|
}
|
||||||
_send_resize(app, w, h);
|
_send_resize(app, w, h);
|
||||||
|
|
||||||
/* sending audio track info */
|
/* sending audio track info */
|
||||||
|
@ -750,8 +752,6 @@ main(int argc, const char *argv[])
|
||||||
app.em_read = atoi(argv[1]);
|
app.em_read = atoi(argv[1]);
|
||||||
app.em_write = atoi(argv[2]);
|
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);
|
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
|
||||||
snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH);
|
snprintf(cwidth, sizeof(cwidth), "%d", DEFAULTWIDTH);
|
||||||
snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT);
|
snprintf(cheight, sizeof(cheight), "%d", DEFAULTHEIGHT);
|
||||||
|
|
Loading…
Reference in New Issue