summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-26 03:31:31 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-27 14:26:48 +0200
commit49b80fe6b45dad5b04d3903987b287f957b94259 (patch)
tree7cf380b94c7750bb5d3fe60af3781d6efa3cee1c /libmpdemux/demuxer.h
parent298808cddc40b66dde9578ec8abb71094357c3ce (diff)
downloadmpv-49b80fe6b45dad5b04d3903987b287f957b94259.tar.bz2
mpv-49b80fe6b45dad5b04d3903987b287f957b94259.tar.xz
demux: take chapter/attachment name strings without 0-termination
Change the demuxer_add_attachment() and demuxer_add_chapter() functions to take a length argument for various name strings, so those strings do not need to be 0-terminated. This will make it easier to directly pass demuxed data without first making a copy just to add 0-termination. Also allocate the struct demuxer data structures for attachments and chapters with talloc.
Diffstat (limited to 'libmpdemux/demuxer.h')
-rw-r--r--libmpdemux/demuxer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index 5da35efa03..375c0d0ccf 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -452,10 +452,11 @@ int demuxer_type_by_filename(char* filename);
void demuxer_help(void);
int get_demuxer_type_from_name(char *demuxer_name, int *force);
-int demuxer_add_attachment(demuxer_t* demuxer, const char* name,
- const char* type, const void* data, size_t size);
-
-int demuxer_add_chapter(demuxer_t* demuxer, const char* name, uint64_t start, uint64_t end);
+int demuxer_add_attachment(demuxer_t *demuxer, const char *name,
+ int name_maxlen, const char *type, int type_maxlen,
+ const void *data, size_t size);
+int demuxer_add_chapter(demuxer_t *demuxer, const char *name, int name_maxlen,
+ uint64_t start, uint64_t end);
int demuxer_seek_chapter(demuxer_t *demuxer, int chapter, double *seek_pts,
char **chapter_name);