Commit ee70e4d9 authored by conrad's avatar conrad

fix up some oggz_write tests


git-svn-id: http://svn.annodex.net/liboggz/trunk@501 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 7db62bd8
......@@ -56,12 +56,13 @@ hungry (OGGZ * oggz, int empty, void * user_data)
op.granulepos = granulepos;
op.packetno = packetno;
if (bytes < 0) INFO ("Feeding packet with negative byte count");
err = oggz_write_feed (oggz, &op, serialno, 0, NULL);
if (packetno == 0) {
if (err != 0)
FAIL ("Could not feed OGGZ");
} else {
INFO ("Feeding packet with negative byte count");
if (err != OGGZ_ERR_BAD_BYTES)
FAIL ("Bad bytes not detected");
......
......@@ -45,7 +45,7 @@ hungry (OGGZ * oggz, int empty, void * user_data)
ogg_packet op;
int err;
buf[1] = 'x';
buf[0] = 'x';
op.packet = buf;
op.bytes = 1;
......
......@@ -34,6 +34,7 @@
#include "oggz_tests.h"
static unsigned char buf[1];
static long serialno;
static int guard = 0;
static long b_o_s = 1;
......@@ -42,7 +43,6 @@ static ogg_int64_t packetno = 0;
static int
hungry (OGGZ * oggz, int empty, void * user_data)
{
unsigned char buf[1];
ogg_packet op;
int ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment