summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_lavf.c
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2010-05-19 12:44:37 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-22 06:40:28 +0300
commitbc072fb7dc314710aa8c822b400efa3072b8c6ad (patch)
tree3c6ca55fa7931d08f98f5ef518eb05178b0fe10a /libmpdemux/demux_lavf.c
parent9f508dab976b0e4cf43da8b9ef31de357ef76d2f (diff)
downloadmpv-bc072fb7dc314710aa8c822b400efa3072b8c6ad.tar.bz2
mpv-bc072fb7dc314710aa8c822b400efa3072b8c6ad.tar.xz
demux: use bstr arguments for demuxer_add_attachment() and demuxer_add_chapter()
Diffstat (limited to 'libmpdemux/demux_lavf.c')
-rw-r--r--libmpdemux/demux_lavf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index 2cdacff30c..2e8495c1c4 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -28,6 +28,7 @@
#include "options.h"
#include "mp_msg.h"
#include "av_opts.h"
+#include "bstr.h"
#include "stream/stream.h"
#include "aviprint.h"
@@ -449,9 +450,10 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
}
case CODEC_TYPE_ATTACHMENT:{
if (st->codec->codec_id == CODEC_ID_TTF)
- demuxer_add_attachment(demuxer, st->filename, INT_MAX,
- "application/x-truetype-font", INT_MAX,
- codec->extradata, codec->extradata_size);
+ demuxer_add_attachment(demuxer, BSTR(st->filename),
+ BSTR("application/x-truetype-font"),
+ (struct bstr){codec->extradata,
+ codec->extradata_size});
break;
}
default:
@@ -547,7 +549,7 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
uint64_t start = av_rescale_q(c->start, c->time_base, (AVRational){1,1000});
uint64_t end = av_rescale_q(c->end, c->time_base, (AVRational){1,1000});
t = av_metadata_get(c->metadata, "title", NULL, 0);
- demuxer_add_chapter(demuxer, t ? t->value : NULL, INT_MAX, start, end);
+ demuxer_add_chapter(demuxer, t ? BSTR(t->value) : BSTR(NULL), start, end);
}
for(i=0; i<avfc->nb_streams; i++)