Commit 3b99bdb9 authored by aurel's avatar aurel

use new metadata API in wc3 demuxer

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17627 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8220cd25
...@@ -132,6 +132,7 @@ static int wc3_read_header(AVFormatContext *s, ...@@ -132,6 +132,7 @@ static int wc3_read_header(AVFormatContext *s,
unsigned int size; unsigned int size;
AVStream *st; AVStream *st;
unsigned char preamble[WC3_PREAMBLE_SIZE]; unsigned char preamble[WC3_PREAMBLE_SIZE];
char buffer[513];
int ret = 0; int ret = 0;
int current_palette = 0; int current_palette = 0;
int bytes_to_read; int bytes_to_read;
...@@ -185,8 +186,10 @@ static int wc3_read_header(AVFormatContext *s, ...@@ -185,8 +186,10 @@ static int wc3_read_header(AVFormatContext *s,
bytes_to_read = size; bytes_to_read = size;
else else
bytes_to_read = 512; bytes_to_read = 512;
if ((ret = get_buffer(pb, s->title, bytes_to_read)) != bytes_to_read) if ((ret = get_buffer(pb, buffer, bytes_to_read)) != bytes_to_read)
return AVERROR(EIO); return AVERROR(EIO);
buffer[bytes_to_read] = 0;
av_metadata_set(&s->metadata, "title", buffer);
break; break;
case SIZE_TAG: case SIZE_TAG:
......
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