diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-01 13:22:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-01 13:22:21 +0100 |
commit | 9bacb576bcdfc86473c04dba8296426fe185ad07 (patch) | |
tree | 2ae86e37e63b46fa181d4ef87549521b957326f5 /libavformat | |
parent | 021c0c5f5246351a290c701e7b5c98458ede1b54 (diff) | |
parent | f726fc21ef76a8ba3445448066f7b2a687fbca16 (diff) | |
download | ffmpeg-9bacb576bcdfc86473c04dba8296426fe185ad07.tar.gz |
Merge commit 'f726fc21ef76a8ba3445448066f7b2a687fbca16'
* commit 'f726fc21ef76a8ba3445448066f7b2a687fbca16':
ogg: Provide an option to offset the serial number
Conflicts:
libavformat/oggenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggenc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 3929311b49..13f2cc7df8 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -71,12 +71,15 @@ typedef struct { OGGPageList *page_list; int pref_size; ///< preferred page size (0 => fill all segments) int64_t pref_duration; ///< preferred page duration (0 => fill all segments) + int serial_offset; } OGGContext; #define OFFSET(x) offsetof(OGGContext, x) #define PARAM AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { + { "serial_offset", "serial number offset", + OFFSET(serial_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, PARAM }, { "oggpagesize", "Set preferred Ogg page size.", offsetof(OGGContext, pref_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, MAX_PAGE_SIZE, AV_OPT_FLAG_ENCODING_PARAM}, { "pagesize", "preferred page size in bytes (deprecated)", @@ -430,7 +433,7 @@ static int ogg_write_header(AVFormatContext *s) for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; - unsigned serial_num = i; + unsigned serial_num = i + ogg->serial_offset; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { if (st->codec->codec_id == AV_CODEC_ID_OPUS) |