gst-gmyth/mythsrc/gstmythtvsrc.c
branchtrunk
changeset 716 1ee5df4c9ccd
parent 697 e323e95b88dd
child 725 a102805611e7
     1.1 --- a/gst-gmyth/mythsrc/gstmythtvsrc.c	Tue May 22 19:21:42 2007 +0100
     1.2 +++ b/gst-gmyth/mythsrc/gstmythtvsrc.c	Fri May 25 19:46:59 2007 +0100
     1.3 @@ -449,9 +449,6 @@
     1.4    /* The caller should know the number of bytes and not read beyond EOS. */
     1.5    if (G_UNLIKELY (src->eos))
     1.6      goto eos;
     1.7 -  if (G_UNLIKELY (src->update_prog_chain))
     1.8 -    goto change_progchain;
     1.9 -
    1.10    GST_DEBUG_OBJECT (src, "offset = %" G_GUINT64_FORMAT ", size = %d...",
    1.11        src->read_offset, MAX_READ_SIZE);
    1.12  
    1.13 @@ -480,6 +477,8 @@
    1.14  	    src->bytes_queue->len);
    1.15        gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
    1.16  		      gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));
    1.17 +      src->update_prog_chain = FALSE;
    1.18 +      src->eos = FALSE;
    1.19  
    1.20        if (result == GMYTH_FILE_READ_NEXT_PROG_CHAIN) {
    1.21        	 /*
    1.22 @@ -492,8 +491,8 @@
    1.23          /* remove wasteful, NUV file header data */
    1.24          /* buffer = g_byte_array_remove_range( buffer, 0, 512 ); */
    1.25  	/* TODO: need to send a new segment event to NUVDemux? */
    1.26 -	gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
    1.27 -			gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));
    1.28 +	//gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
    1.29 +	//		gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));
    1.30  
    1.31          /* goto change_progchain; */
    1.32        }
    1.33 @@ -511,7 +510,7 @@
    1.34          goto change_progchain;
    1.35        else
    1.36          goto read_error;
    1.37 -    } else if (G_UNLIKELY (read == 0)) {
    1.38 +    } else if (G_UNLIKELY (buffer->len == 0)) {
    1.39      	
    1.40        if (buffer != NULL) {
    1.41  	  g_byte_array_free (buffer, TRUE);