mirror of https://git.ffmpeg.org/ffmpeg.git
avformat: Switch AVChapter.id to 64bits
Announced in e318438f2f
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
0a071f7124
commit
e83717e63e
|
@ -1092,11 +1092,7 @@ typedef struct AVProgram {
|
||||||
change dynamically at runtime. */
|
change dynamically at runtime. */
|
||||||
|
|
||||||
typedef struct AVChapter {
|
typedef struct AVChapter {
|
||||||
#if FF_API_CHAPTER_ID_INT
|
|
||||||
int id; ///< unique ID to identify the chapter
|
|
||||||
#else
|
|
||||||
int64_t id; ///< unique ID to identify the chapter
|
int64_t id; ///< unique ID to identify the chapter
|
||||||
#endif
|
|
||||||
AVRational time_base; ///< time base in which the start/end timestamps are specified
|
AVRational time_base; ///< time base in which the start/end timestamps are specified
|
||||||
int64_t start, end; ///< chapter start/end time in time_base units
|
int64_t start, end; ///< chapter start/end time in time_base units
|
||||||
AVDictionary *metadata;
|
AVDictionary *metadata;
|
||||||
|
|
|
@ -579,11 +579,7 @@ void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance);
|
||||||
*
|
*
|
||||||
* @return AVChapter or NULL on error
|
* @return AVChapter or NULL on error
|
||||||
*/
|
*/
|
||||||
#if FF_API_CHAPTER_ID_INT
|
|
||||||
AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base,
|
|
||||||
#else
|
|
||||||
AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
|
AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
|
||||||
#endif
|
|
||||||
int64_t start, int64_t end, const char *title);
|
int64_t start, int64_t end, const char *title);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1671,11 +1671,7 @@ static int mkv_write_chapters(AVFormatContext *s)
|
||||||
int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale);
|
int64_t chapterstart = av_rescale_q(c->start, c->time_base, scale);
|
||||||
int64_t chapterend = av_rescale_q(c->end, c->time_base, scale);
|
int64_t chapterend = av_rescale_q(c->end, c->time_base, scale);
|
||||||
const AVDictionaryEntry *t;
|
const AVDictionaryEntry *t;
|
||||||
#if FF_API_CHAPTER_ID_INT
|
|
||||||
uint64_t uid = create_new_ids ? i + 1ULL : (uint32_t)c->id;
|
|
||||||
#else
|
|
||||||
uint64_t uid = create_new_ids ? i + 1ULL : c->id;
|
uint64_t uid = create_new_ids ? i + 1ULL : c->id;
|
||||||
#endif
|
|
||||||
if (chapterstart < 0 || chapterstart > chapterend || chapterend < 0) {
|
if (chapterstart < 0 || chapterstart > chapterend || chapterend < 0) {
|
||||||
av_log(s, AV_LOG_ERROR,
|
av_log(s, AV_LOG_ERROR,
|
||||||
"Invalid chapter start (%"PRId64") or end (%"PRId64").\n",
|
"Invalid chapter start (%"PRId64") or end (%"PRId64").\n",
|
||||||
|
|
|
@ -4589,11 +4589,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id)
|
||||||
return program;
|
return program;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_CHAPTER_ID_INT
|
|
||||||
AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base,
|
|
||||||
#else
|
|
||||||
AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
|
AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
|
||||||
#endif
|
|
||||||
int64_t start, int64_t end, const char *title)
|
int64_t start, int64_t end, const char *title)
|
||||||
{
|
{
|
||||||
AVChapter *chapter = NULL;
|
AVChapter *chapter = NULL;
|
||||||
|
|
|
@ -58,9 +58,6 @@
|
||||||
#ifndef FF_API_LAVF_AVCTX
|
#ifndef FF_API_LAVF_AVCTX
|
||||||
#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59)
|
#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59)
|
||||||
#endif
|
#endif
|
||||||
#ifndef FF_API_CHAPTER_ID_INT
|
|
||||||
#define FF_API_CHAPTER_ID_INT (LIBAVFORMAT_VERSION_MAJOR < 59)
|
|
||||||
#endif
|
|
||||||
#ifndef FF_API_LAVF_PRIV_OPT
|
#ifndef FF_API_LAVF_PRIV_OPT
|
||||||
#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
|
#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue