[svn r701] Solves some bugs with the program info.
1.1 --- a/gst-gmyth/mythsrc/gstmythtvsrc.c Fri May 18 22:45:49 2007 +0100
1.2 +++ b/gst-gmyth/mythsrc/gstmythtvsrc.c Fri May 18 23:29:00 2007 +0100
1.3 @@ -474,23 +474,30 @@
1.4 result = do_read_request_response (src, buffer_size_inter, buffer);
1.5
1.6 /* got the next program info? */
1.7 - if (G_UNLIKELY (src->update_prog_chain)) {
1.8 + if (G_UNLIKELY (src->update_prog_chain) || (result == GMYTH_FILE_READ_NEXT_PROG_CHAIN)) {
1.9 + GST_DEBUG_OBJECT (src, "Update PROGRAM CHAIN!!! buffer_size = %d.",
1.10 + src->bytes_queue->len);
1.11 + gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
1.12 + gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));
1.13 +
1.14 if (result == GMYTH_FILE_READ_NEXT_PROG_CHAIN) {
1.15 + /*
1.16 if (buffer != NULL) {
1.17 g_byte_array_free (buffer, TRUE);
1.18 buffer = NULL;
1.19 }
1.20 - goto program_chain_changed;
1.21 + goto program_chain_changed; */
1.22 } else if (result == GMYTH_FILE_READ_OK) {
1.23 /* remove wasteful, NUV file header data */
1.24 - buffer = g_byte_array_remove_range( buffer, 0, 512 );
1.25 + /* buffer = g_byte_array_remove_range( buffer, 0, 512 ); */
1.26 /* TODO: need to send a new segment event to NUVDemux? */
1.27 gst_pad_push_event (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
1.28 gst_event_new_new_segment (TRUE, 1.0, GST_FORMAT_BYTES, 0, -1, 0));
1.29
1.30 /* goto change_progchain; */
1.31 }
1.32 - }
1.33 +
1.34 + } /* */
1.35
1.36 if (G_UNLIKELY (buffer->len < 0)) {
1.37