# HG changeset patch # User renatofilho # Date 1175785328 -3600 # Node ID 224adf6cd007db5e95715bf56ac6713169ed33e4 # Parent 178207a9cd61a6c2b6ed63f6ae283921a80ec627 [svn r513] bug fix diff -r 178207a9cd61 -r 224adf6cd007 gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Thu Apr 05 15:26:47 2007 +0100 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Thu Apr 05 16:02:08 2007 +0100 @@ -229,7 +229,7 @@ nuv_frame_header fh; /* anothers info */ - gint64 header_lengh; + guint64 header_lengh; gint64 time_start; gint64 time_diff; gint64 time_qos; @@ -698,7 +698,6 @@ gst_nuv_demux_validate_header (nuv_frame_header *h) { gboolean valid = FALSE; - //g_debug ("Type %d = Compression %d", h->i_type, h->i_compression); //g_usleep (1 * G_USEC_PER_SEC ); switch (h->i_type) { /* @@ -799,7 +798,6 @@ h = nuv->priv->fh; if (h.i_type == 'R') { - nuv->priv->offset += h.i_length; goto done; } @@ -1044,7 +1042,7 @@ } GST_DEBUG_OBJECT (nuv, "CREATING INDEX: DONE : DURATION Bytes/Sec: %" G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT, nuv->priv->offset, nuv->priv->duration_time); - + nuv->priv->duration_bytes = nuv->priv->offset; nuv->priv->offset = nuv->priv->header_lengh; @@ -1107,8 +1105,6 @@ if (nuv->priv->mode == NUV_PULL_MODE) { gst_nuv_demux_create_seek_index (nuv); } - nuv->priv->state = GST_NUV_DEMUX_FRAME_HEADER; - break; case GST_NUV_DEMUX_FRAME_HEADER: res = gst_nuv_demux_read_head_frame (nuv); @@ -1175,6 +1171,7 @@ return ret; } + if (nuv->priv->mode == NUV_PULL_MODE) { ret = gst_pad_pull_range (nuv->priv->sinkpad, nuv->priv->offset, size, buffer); if (ret == GST_FLOW_OK) {