summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2004-04-01 11:48:27 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2004-04-01 11:48:27 +0000
commite0006ee0b9556be2f69e0ac6ac4ef102937f0966 (patch)
treeb30b8bd7451ff35483eb7a7e81fa523e34e52d81 /ext
parentc683b2301c41e968ddd52b1b2cd57b5ac25ad580 (diff)
a52dec: Use a debug category, Output timestamps correctly
Original commit message from CVS: a52dec: Use a debug category, Output timestamps correctly Emit tag info, Handle events, tell liba52dec about cpu capabilities so it can use MMX etc. dvdec: Fix a crasher accessing invalid memory dvdnavsrc:Some support for byte-format seeking. Small fixes for still frames and menu button overlays mpeg2dec: Use a debug category. Adjust the report level of several items to LOG. Call mpeg2_custom_fbuf to mark our buffers as 'custom buffers' so it doesn't lose the GstBuffer pointer navseek: Add the navseek debug element for seeking back and forth in a video stream using arrow keys. mpeg2subt:Pretty much a complete rewrite. Now a loopbased element. May still require work to properly synchronise subtitle buffers. mpegdemux: dvddemux: Don't attempt to create subbuffers of size 0 Reduce a couple of error outputs to warnings. y4mencode:Output the y4m frame header correctly
Diffstat (limited to 'ext')
-rw-r--r--ext/dv/gstdvdec.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index 5625237d..fc5f1626 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -777,9 +777,18 @@ gst_dvdec_loop (GstElement * element)
dvdec = GST_DVDEC (element);
+ /*
+ * Apparently dv_parse_header can read from the body of the frame
+ * too, so it needs more than header_size bytes. Wacky!
+ */
+ if (dvdec->found_header)
+ length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER);
+ else
+ length = NTSC_BUFFER;
+
/* first read enough bytes to parse the header */
- got_bytes = gst_bytestream_peek_bytes (dvdec->bs, &inframe, header_size);
- if (got_bytes < header_size) {
+ got_bytes = gst_bytestream_peek_bytes (dvdec->bs, &inframe, length);
+ if (got_bytes < length) {
gst_dvdec_handle_sink_event (dvdec);
return;
}
@@ -918,6 +927,11 @@ gst_dvdec_change_state (GstElement * element)
dvdec->decoder =
dv_decoder_new (0, dvdec->clamp_luma, dvdec->clamp_chroma);
dvdec->decoder->quality = dvdec->quality;
+ /*
+ * Enable this function call when libdv2 0.100 or higher is more
+ * common
+ */
+ /* dv_set_quality (dvdec->decoder, dvdec->quality); */
break;
case GST_STATE_PAUSED_TO_PLAYING:
break;