diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2012-02-15 10:32:17 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2012-02-15 15:48:44 -0300 |
commit | 1182dd0c1ba3e97d197d145dcdb0feeb76f6cd1e (patch) | |
tree | 1039e209c2ea2cbb1ffd2df41432146c6a76cfe5 /gst | |
parent | cda0d3aed881018c4a39273613f7644742705ece (diff) | |
download | gstreamer-plugins-bad-1182dd0c1ba3e97d197d145dcdb0feeb76f6cd1e.tar.gz |
tsdemux: Avoid throwing FLOW_ERROR on last PCR processing error
In the case of scanning last pcr, errors are not critical, so we keep
the stream flowing.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 7049c816e..0fd86f98f 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -1697,7 +1697,7 @@ process_pcr (MpegTSBase * base, guint64 initoff, TSPcrOffset * pcroffset, GstFlowReturn ret = GST_FLOW_OK; MpegTSBaseProgram *program; GstBuffer *buf; - guint nbpcr, i = 0; + guint i, nbpcr = 0; guint32 pcrmask, pcrpattern; guint64 pcrs[50]; guint64 pcroffs[50]; @@ -1708,8 +1708,12 @@ process_pcr (MpegTSBase * base, guint64 initoff, TSPcrOffset * pcroffset, /* Get the program */ program = demux->program; - if (G_UNLIKELY (program == NULL)) - return GST_FLOW_ERROR; + if (G_UNLIKELY (program == NULL)) { + GST_DEBUG ("No program set, can not keep processing pcr"); + + ret = GST_FLOW_ERROR; + goto beach; + } /* First find the first X PCR */ nbpcr = 0; |