# HG changeset patch # User rosfran # Date 1180031593 -3600 # Node ID e2c57fecafdea9e619e154593a6684d0e41f0dd3 # Parent 5cc97240e2389cc99b6d028ec3576bfb2cc0f24c [svn r713] Added more debug messages, and fixed a bug in the program info update. diff -r 5cc97240e238 -r e2c57fecafde gst-gmyth/mythsrc/gstmythtvsrc.c --- a/gst-gmyth/mythsrc/gstmythtvsrc.c Thu May 24 01:26:10 2007 +0100 +++ b/gst-gmyth/mythsrc/gstmythtvsrc.c Thu May 24 19:33:13 2007 +0100 @@ -449,9 +449,6 @@ /* The caller should know the number of bytes and not read beyond EOS. */ if (G_UNLIKELY (src->eos)) goto eos; - if (G_UNLIKELY (src->update_prog_chain)) - goto change_progchain; - GST_DEBUG_OBJECT (src, "offset = %" G_GUINT64_FORMAT ", size = %d...", src->read_offset, MAX_READ_SIZE); @@ -480,6 +477,8 @@ src->bytes_queue->len); gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)), gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0)); + src->update_prog_chain = FALSE; + src->eos = FALSE; if (result == GMYTH_FILE_READ_NEXT_PROG_CHAIN) { /* @@ -492,8 +491,8 @@ /* remove wasteful, NUV file header data */ /* buffer = g_byte_array_remove_range( buffer, 0, 512 ); */ /* TODO: need to send a new segment event to NUVDemux? */ - gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)), - gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0)); + //gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)), + // gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0)); /* goto change_progchain; */ } @@ -511,7 +510,7 @@ goto change_progchain; else goto read_error; - } else if (G_UNLIKELY (read == 0)) { + } else if (G_UNLIKELY (buffer->len == 0)) { if (buffer != NULL) { g_byte_array_free (buffer, TRUE);