diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2009-03-01 15:28:56 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2009-03-01 15:28:56 +0000 |
commit | feacba6c26cd4514abf7d0c6c5688ee483af9a15 (patch) | |
tree | d136e94989205c2303b84288fedfe62abe5975c0 /libavformat/r3d.c | |
parent | 5ee999b8e796e16063b8dbc7061f6364e5dfa827 (diff) | |
download | ffmpeg-feacba6c26cd4514abf7d0c6c5688ee483af9a15.tar.gz |
use new metadata API in r3d demuxer
Originally committed as revision 17686 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/r3d.c')
-rw-r--r-- | libavformat/r3d.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/r3d.c b/libavformat/r3d.c index 20f41f5944..b645d928a0 100644 --- a/libavformat/r3d.c +++ b/libavformat/r3d.c @@ -51,6 +51,7 @@ static int read_atom(AVFormatContext *s, Atom *atom) static int r3d_read_red1(AVFormatContext *s) { AVStream *st = av_new_stream(s, 0); + char filename[258]; int tmp, tmp2; if (!st) @@ -92,12 +93,11 @@ static int r3d_read_red1(AVFormatContext *s) av_set_pts_info(ast, 32, 1, st->time_base.den); } - st->filename = av_mallocz(258); - if (!st->filename) - return AVERROR(ENOMEM); - get_buffer(s->pb, st->filename, 257); + get_buffer(s->pb, filename, 257); + filename[sizeof(filename)-1] = 0; + av_metadata_set(&st->metadata, "filename", filename); - 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, "timescale %d\n", st->time_base.den); dprintf(s, "frame rate %d/%d\n", |