# HG changeset patch # User rosfran # Date 1165438215 0 # Node ID b3c3e10c32935c1aab12c478b960e40f842ca681 # Parent b8a07bf0375b7d27b339379f72b9a2379e152094 [svn r211] Some code clean-ups. diff -r b8a07bf0375b -r b3c3e10c3293 gst-plugins-mythtv/src/gstmythtvsrc.c --- a/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 06 20:25:59 2006 +0000 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c Wed Dec 06 20:50:15 2006 +0000 @@ -696,16 +696,14 @@ // g_string_new( src->uri_name ), -1, src->mythtv_version ); src->file_transfer = gmyth_file_transfer_new(src->backend_info); - if ( src->file_transfer == NULL ) { + if ( NULL == src->file_transfer ) + { goto init_failed; } GST_INFO_OBJECT( src, "[%s] uri = %s.\n", __FUNCTION__, src->uri_name ); ret = gmyth_file_transfer_open( src->file_transfer, src->uri_name ); - /* sets the Playback monitor connection */ - //ret = gmyth_file_transfer_playback_setup( &(src->file_transfer), src->live_tv ); - if ( src->live_tv == TRUE && ret == TRUE ) { /* loop finished, set the max tries variable to zero again... */ wait_to_transfer = 0; @@ -730,6 +728,9 @@ #endif goto begin_req_failed; } + + GST_INFO_OBJECT( src, "MythTV FileTransfer filesize = %lld, content_size = %lld!\n", + src->file_transfer->filesize, src->content_size ); src->content_size = src->file_transfer->filesize; @@ -739,10 +740,17 @@ src->bytes_queue = g_byte_array_sized_new( INTERNAL_BUFFER_SIZE ); src->buffer_remain = 0; - //gst_pad_push_event ( GST_BASE_SRC_PAD (GST_BASE_SRC (src)), - // gst_event_new_new_segment ( TRUE, 1.0, GST_FORMAT_TIME, 0, src->content_size, 0 ) ); + gst_pad_push_event ( GST_BASE_SRC_PAD (GST_BASE_SRC (src)), + gst_event_new_new_segment ( TRUE, 1.0, GST_FORMAT_TIME, 0, src->content_size, 0 ) ); done: + + if ( chain_id_local != NULL ) + { + g_string_free( chain_id_local, TRUE ); + chain_id_local = NULL; + } + return TRUE; /* ERRORS */