summaryrefslogtreecommitdiff
path: root/src/gstppssrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gstppssrc.c')
-rw-r--r--src/gstppssrc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gstppssrc.c b/src/gstppssrc.c
index 37c4fae..dcd5ed5 100644
--- a/src/gstppssrc.c
+++ b/src/gstppssrc.c
@@ -589,21 +589,24 @@ static gboolean
gst_pps_src_open (GstPpsSrc *src)
{
int ret;
- gchar *location = src->tvod_location ? src->tvod_location : src->location;
- GST_DEBUG_OBJECT (src, "add item: (\"%s\")", location);
- src->fd = ret = ppsvod_add_item (location, src->vip_flag);
+ GST_DEBUG_OBJECT (src, "add item: (\"%s\")", src->location);
+ src->fd = ret = ppsvod_add_item (src->location, src->vip_flag);
if (ret < 0) {
- GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
- (NULL), ("Couldn't open resource"));
- return FALSE;
+ if (src->tvod_location)
+ src->fd = ret = ppsvod_add_item (src->tvod_location, src->vip_flag);
+ if (ret < 0) {
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
+ (NULL), ("Couldn't open the stream"));
+ return FALSE;
+ }
}
gst_pps_src_report_progress (src, 0);
ret = ppsvod_play_item (src->fd, strlen (src->valid_code) ? src->valid_code : NULL);
if (ret < 0) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
- (NULL), ("Couldn't play resource"));
+ (NULL), ("Couldn't play the stream"));
ppsvod_remove_item (src->fd);
src->fd = -1;
return FALSE;