In the case of scanning last pcr, errors are not critical, so we keep
the stream flowing.
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];
/* 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;