gst-plugins-mythtv/src/gstmythtvsrc.c
branchtrunk
changeset 152 22db2f4b6f86
parent 151 1799c8782451
child 159 2db0e1da044a
     1.1 --- a/gst-plugins-mythtv/src/gstmythtvsrc.c	Thu Nov 30 19:23:52 2006 +0000
     1.2 +++ b/gst-plugins-mythtv/src/gstmythtvsrc.c	Thu Nov 30 19:41:27 2006 +0000
     1.3 @@ -468,9 +468,8 @@
     1.4    guint buffer_size = ( src->buffer_remain < MAX_READ_SIZE) ? src->buffer_remain : MAX_READ_SIZE;
     1.5    
     1.6    /* Create the buffer. */
     1.7 -  /*
     1.8    ret = gst_pad_alloc_buffer ( GST_BASE_SRC_PAD (GST_BASE_SRC (psrc)),
     1.9 -      src->read_offset, buffer_size,
    1.10 +      GST_BUFFER_OFFSET_NONE, buffer_size,
    1.11        GST_PAD_CAPS (GST_BASE_SRC_PAD (GST_BASE_SRC (psrc))), outbuf );    
    1.12  
    1.13    if (G_UNLIKELY (ret != GST_FLOW_OK)) {
    1.14 @@ -479,8 +478,7 @@
    1.15      else
    1.16        goto done;
    1.17    }
    1.18 -  */
    1.19 -  *outbuf = gst_buffer_new_and_alloc( buffer_size );
    1.20 +  //*outbuf = gst_buffer_new_and_alloc( buffer_size );
    1.21    
    1.22    /* gets the first buffer_size bytes from the byte array buffer variable */ 
    1.23    //guint8 *buf = g_memdup( src->bytes_queue->data, buffer_size );
    1.24 @@ -489,8 +487,8 @@
    1.25    	read == -1 ? "NO, got from buffer" : "YES, go see the backend's log file", src->buffer_remain );
    1.26  
    1.27    GST_BUFFER_SIZE (*outbuf) = buffer_size;
    1.28 -  GST_BUFFER_MALLOCDATA( *outbuf ) = g_malloc0( GST_BUFFER_SIZE (*outbuf) );
    1.29 -  GST_BUFFER_DATA( *outbuf ) = GST_BUFFER_MALLOCDATA( *outbuf );
    1.30 +  //GST_BUFFER_MALLOCDATA( *outbuf ) = g_malloc0( GST_BUFFER_SIZE (*outbuf) );
    1.31 +  //GST_BUFFER_DATA( *outbuf ) = GST_BUFFER_MALLOCDATA( *outbuf );
    1.32    g_memmove( GST_BUFFER_DATA( (*outbuf) ), src->bytes_queue->data, GST_BUFFER_SIZE(*outbuf) );
    1.33    GST_BUFFER_OFFSET (*outbuf) = src->read_offset;
    1.34    GST_BUFFER_OFFSET_END (*outbuf) = src->read_offset + GST_BUFFER_SIZE (*outbuf);