[grilo-plugins/fremantle] [youtube] Check for NULL duration before setting it to the GrlMedia
- From: Xabier Rodriguez Calvar <xrcalvar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/fremantle] [youtube] Check for NULL duration before setting it to the GrlMedia
- Date: Mon, 26 Apr 2010 11:21:46 +0000 (UTC)
commit df3ac1de9d6cbaed656087c8450e2ec18511fbcd
Author: Xabier Rodriguez Calvar <xrcalvar igalia com>
Date: Mon Apr 26 13:18:52 2010 +0200
[youtube] Check for NULL duration before setting it to the GrlMedia
src/youtube/grl-youtube.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/youtube/grl-youtube.c b/src/youtube/grl-youtube.c
index de22b4f..b257b6d 100644
--- a/src/youtube/grl-youtube.c
+++ b/src/youtube/grl-youtube.c
@@ -460,7 +460,8 @@ build_media_from_entry (GrlMedia *content,
grl_media_set_date (media, entry->published);
break;
case GRL_METADATA_KEY_DURATION:
- grl_media_set_duration (media, atoi (entry->duration));
+ if (entry->duration)
+ grl_media_set_duration (media, atoi (entry->duration));
break;
case GRL_METADATA_KEY_MIME:
grl_media_set_mime (media, YOUTUBE_VIDEO_MIME);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]