[gst-devel] and now for something crazy

Ronald Bultje rbultje at ronald.bitfreak.net
Fri Jun 6 17:47:07 CEST 2003


On Mon, 2003-06-02 at 13:35, Joshua N Pritikin wrote:
> Can someone try this pipeline (CVS HEAD):
> 
>   ./gst-launch filesrc location=/local/aleader/ljr.mpg ! mpegdemux name=demux demux.video_00 ! mpeg2dec ! divxenc ! filesink location=/tmp/test.m1v
> 
> Suddenly, i get lots of these messages:
> 
> WARNING **: filesink: 1119 bytes should be written, only 591 bytes written
> WARNING **: filesink: 1083 bytes should be written, only 362 bytes written
> ... etc ...

Oh, we might want to add a loop there, so, something like:

guint64 size = GST_BUFFER_SIZE (buf);
glong data_written;
while (size > 0) {
  data_written = fwrite();
  if (data_written < 0) {
    gst_element_error(blabla, strerror(errno), blabla);
    return;
  }
  size -= data_written;
}

I can come up with a patch for this tomorrow if anyone wants it.

Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>





More information about the gstreamer-devel mailing list