gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c
branchtrunk
changeset 83 7550ece15943
parent 82 653adbffb418
child 84 8b867c828e89
     1.1 --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Mon Nov 13 20:48:35 2006 +0000
     1.2 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c	Mon Nov 13 20:53:58 2006 +0000
     1.3 @@ -462,7 +462,12 @@
     1.4  	  if (ret != GST_FLOW_OK)
     1.5  		  return ret;
     1.6  
     1.7 -       GST_BUFFER_TIMESTAMP (buf) = h->i_timecode * GST_MSECOND;
     1.8 +      if(h->i_timecode < 0) {
     1.9 +          GST_WARNING_OBJECT (nuv, "timecode negative");
    1.10 +          h->i_timecode = 0;
    1.11 +      }
    1.12 +      
    1.13 +      GST_BUFFER_TIMESTAMP (buf) = h->i_timecode * GST_MSECOND;
    1.14    }
    1.15  
    1.16    switch (h->i_type) {
    1.17 @@ -481,7 +486,17 @@
    1.18                                       GST_CLOCK_TIME_NONE, 0));
    1.19          nuv->new_video_segment = FALSE;
    1.20        }
    1.21 -      res = gst_nuv_demux_push_dat (nuv, h->i_lengh, nuv->src_video_pad);
    1.22 +      //GST_WARNING_OBJECT (nuv, "setting timestamp to zero");
    1.23 +
    1.24 +      //GST_BUFFER_TIMESTAMP (buf) = 0;
    1.25 +      GST_BUFFER_OFFSET (buf) = GST_CLOCK_TIME_NONE;
    1.26 +      GST_BUFFER_SIZE (buf) = h->i_length;
    1.27 +      gst_buffer_set_caps (buf, GST_PAD_CAPS (nuv->src_video_pad));
    1.28 +      ret = gst_pad_push (nuv->src_video_pad, buf);
    1.29 +      if (ret != GST_FLOW_OK) {
    1.30 +        GST_WARNING_OBJECT (nuv, "error pushing on srcpad %s, is linked? = %d",
    1.31 +            gst_pad_get_name (nuv->src_video_pad), gst_pad_is_linked (nuv->src_video_pad));
    1.32 +      }
    1.33        break;
    1.34      }
    1.35      case 'A':
    1.36 @@ -500,6 +515,8 @@
    1.37          nuv->new_audio_segment = FALSE;
    1.38        }
    1.39         
    1.40 +      //GST_BUFFER_TIMESTAMP (buf) = h->i_timecode * GST_MSECOND;
    1.41 +      GST_BUFFER_OFFSET (buf) = GST_CLOCK_TIME_NONE;
    1.42        GST_BUFFER_SIZE (buf) = h->i_length;
    1.43        gst_buffer_set_caps (buf, GST_PAD_CAPS (nuv->src_audio_pad));
    1.44        ret = gst_pad_push (nuv->src_audio_pad, buf);