33f483f736
* Security fixes: - CVE-2006-2802: possible buffer overflow in the HTTP plugin. - possible buffer overflow via bad indexes in specially-crafted AVI files * Fix a potential crash with fixed-size lacing in the Matroska demuxer * Enable AMD64 mmx/sse support in some plugins (tvtime, libmpeg2, goom...) * Fix xxmc subpictures (broken since 1.1.1) * Add support for RealPlayer 10 codecs WANTLIB tweak from bernd@ testing by steven@ and bernd@
78 lines
3.0 KiB
Plaintext
78 lines
3.0 KiB
Plaintext
$OpenBSD: patch-src_input_input_vcd_c,v 1.2 2006/10/12 04:48:14 brad Exp $
|
|
--- src/input/input_vcd.c.orig Sun Jul 9 10:37:35 2006
|
|
+++ src/input/input_vcd.c Fri Sep 15 17:53:21 2006
|
|
@@ -95,7 +95,7 @@ typedef struct {
|
|
#if defined (__linux__) || defined(__sun)
|
|
struct cdrom_tochdr tochdr;
|
|
struct cdrom_tocentry tocent[100];
|
|
-#elif defined (__FreeBSD__)
|
|
+#elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
|
struct ioc_toc_header tochdr;
|
|
struct cd_toc_entry *tocent;
|
|
off_t cur_sec;
|
|
@@ -120,7 +120,7 @@ typedef struct {
|
|
|
|
int cur_track;
|
|
|
|
-#if defined (__linux__) || defined(__sun) || defined(__FreeBSD__)
|
|
+#if defined (__linux__) || defined(__sun) || defined(__FreeBSD__) || defined (__OpenBSD__)
|
|
uint8_t cur_min, cur_sec, cur_frame;
|
|
#endif
|
|
|
|
@@ -180,7 +180,7 @@ static int input_vcd_read_toc (vcd_input
|
|
|
|
return 0;
|
|
}
|
|
-#elif defined (__FreeBSD__)
|
|
+#elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
|
static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
|
|
|
|
struct ioc_read_toc_entry te;
|
|
@@ -396,7 +396,7 @@ static off_t vcd_plugin_read (input_plug
|
|
memcpy (buf, data.data, VCDSECTORSIZE); /* FIXME */
|
|
return VCDSECTORSIZE;
|
|
}
|
|
-#elif defined (__FreeBSD__)
|
|
+#elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
|
static off_t vcd_plugin_read (input_plugin_t *this_gen,
|
|
char *buf, off_t nlen) {
|
|
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
|
|
@@ -534,7 +534,7 @@ static buf_element_t *vcd_plugin_read_bl
|
|
memcpy (buf->mem, data.data, VCDSECTORSIZE); /* FIXME */
|
|
return buf;
|
|
}
|
|
-#elif defined (__FreeBSD__)
|
|
+#elif (__FreeBSD__) || defined (__OpenBSD__)
|
|
static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen,
|
|
fifo_buffer_t *fifo, off_t nlen) {
|
|
|
|
@@ -693,7 +693,7 @@ static off_t vcd_plugin_seek (input_plug
|
|
|
|
return offset ; /* FIXME */
|
|
}
|
|
-#elif defined (__FreeBSD__)
|
|
+#elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
|
static off_t vcd_plugin_seek (input_plugin_t *this_gen,
|
|
off_t offset, int origin) {
|
|
|
|
@@ -767,7 +767,7 @@ static off_t vcd_plugin_get_length (inpu
|
|
|
|
return (off_t) 0;
|
|
}
|
|
-#elif defined (__FreeBSD__)
|
|
+#elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
|
static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
|
|
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
|
|
off_t len ;
|
|
@@ -862,6 +862,10 @@ static int vcd_plugin_open (input_plugin
|
|
this->cur_min = this->cls->tocent[this->cur_track].cdte_addr.msf.minute;
|
|
this->cur_sec = this->cls->tocent[this->cur_track].cdte_addr.msf.second;
|
|
this->cur_frame = this->cls->tocent[this->cur_track].cdte_addr.msf.frame;
|
|
+#elif defined (__OpenBSD__)
|
|
+ this->cur_min = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.minute;
|
|
+ this->cur_sec = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.second;
|
|
+ this->cur_frame = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.frame;
|
|
#elif defined (__FreeBSD__)
|
|
{
|
|
int bsize = 2352;
|