Commit df94b4e7 authored by pross's avatar pross

Determine VOC block length when length field is zero


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20596 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2c8aa8d3
......@@ -26,7 +26,7 @@
#include "riff.h" /* for CodecTag */
typedef struct voc_dec_context {
int remaining_size;
int64_t remaining_size;
} VocDecContext;
typedef enum voc_type {
......
......@@ -76,6 +76,11 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
if (type == VOC_TYPE_EOF)
return AVERROR(EIO);
voc->remaining_size = get_le24(pb);
if (!voc->remaining_size) {
if (url_is_streamed(s->pb))
return AVERROR(EIO);
voc->remaining_size = url_fsize(pb) - url_ftell(pb);
}
max_size -= 4;
switch (type) {
......
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