1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

use new metadata API in r3d demuxer

Originally committed as revision 17686 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2009-03-01 15:28:56 +00:00
parent 5ee999b8e7
commit feacba6c26

View File

@ -51,6 +51,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
static int r3d_read_red1(AVFormatContext *s) static int r3d_read_red1(AVFormatContext *s)
{ {
AVStream *st = av_new_stream(s, 0); AVStream *st = av_new_stream(s, 0);
char filename[258];
int tmp, tmp2; int tmp, tmp2;
if (!st) if (!st)
@ -92,12 +93,11 @@ static int r3d_read_red1(AVFormatContext *s)
av_set_pts_info(ast, 32, 1, st->time_base.den); av_set_pts_info(ast, 32, 1, st->time_base.den);
} }
st->filename = av_mallocz(258); get_buffer(s->pb, filename, 257);
if (!st->filename) filename[sizeof(filename)-1] = 0;
return AVERROR(ENOMEM); av_metadata_set(&st->metadata, "filename", filename);
get_buffer(s->pb, st->filename, 257);
dprintf(s, "filename %s\n", st->filename); dprintf(s, "filename %s\n", filename);
dprintf(s, "resolution %dx%d\n", st->codec->width, st->codec->height); dprintf(s, "resolution %dx%d\n", st->codec->width, st->codec->height);
dprintf(s, "timescale %d\n", st->time_base.den); dprintf(s, "timescale %d\n", st->time_base.den);
dprintf(s, "frame rate %d/%d\n", dprintf(s, "frame rate %d/%d\n",