summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorSteve Baker <steve@stevebaker.org>2002-05-15 19:05:41 +0000
committerSteve Baker <steve@stevebaker.org>2002-05-15 19:05:41 +0000
commitc622ee22a845296ab4454fc3ad8173f015148380 (patch)
treeea0a2915aea2bcbc3660e48ac04bef6083c10b2e /ext
parentcd96ede62cc1e9c54a4eb84e58bf0e70bfdb233a (diff)
use new bytestream api. please test if you care about this plugin
Original commit message from CVS: use new bytestream api. please test if you care about this plugin
Diffstat (limited to 'ext')
-rw-r--r--ext/dv/gstdvdec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index e2acb470..36f8418f 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -271,12 +271,13 @@ gst_dvdec_loop (GstElement *element)
gint outframe_pitches[3];
gboolean PAL;
gint height;
+ guint32 length, got_bytes;
dvdec = GST_DVDEC (element);
/* first read enough bytes to parse the header */
- inframe = gst_bytestream_peek_bytes (dvdec->bs, header_size);
- if (!inframe) {
+ got_bytes = gst_bytestream_peek_bytes (dvdec->bs, &inframe, header_size);
+ if (got_bytes < header_size) {
gst_dvdec_handle_event (dvdec);
return;
}
@@ -285,10 +286,11 @@ gst_dvdec_loop (GstElement *element)
PAL = dv_system_50_fields (dvdec->decoder);
height = (PAL ? PAL_HEIGHT : NTSC_HEIGHT);
+ length = (PAL ? PAL_BUFFER : NTSC_BUFFER);
/* then read the read data */
- buf = gst_bytestream_read (dvdec->bs, (PAL ? PAL_BUFFER : NTSC_BUFFER));
- if (!buf) {
+ got_bytes = gst_bytestream_read (dvdec->bs, &buf, length);
+ if (got_bytes < length) {
gst_dvdec_handle_event (dvdec);
return;
}