提交 1fa395e4 编写于 作者: A Anton Khirnov

lavf: use avpriv_ prefix for ff_new_chapter().

It's used in libavdevice.
上级 68d3aec8
...@@ -97,7 +97,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap) ...@@ -97,7 +97,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
for (i = 0; i < s->drive->tracks; i++) { for (i = 0; i < s->drive->tracks; i++) {
char title[16]; char title[16];
snprintf(title, sizeof(title), "track %02d", s->drive->disc_toc[i].bTrack); snprintf(title, sizeof(title), "track %02d", s->drive->disc_toc[i].bTrack);
ff_new_chapter(ctx, i, st->time_base, s->drive->disc_toc[i].dwStartSector, avpriv_new_chapter(ctx, i, st->time_base, s->drive->disc_toc[i].dwStartSector,
s->drive->disc_toc[i+1].dwStartSector, title); s->drive->disc_toc[i+1].dwStartSector, title);
} }
......
...@@ -573,7 +573,7 @@ static int asf_read_marker(AVFormatContext *s, int64_t size) ...@@ -573,7 +573,7 @@ static int asf_read_marker(AVFormatContext *s, int64_t size)
name_len = avio_rl32(pb); // name length name_len = avio_rl32(pb); // name length
if ((ret = avio_get_str16le(pb, name_len * 2, name, sizeof(name))) < name_len) if ((ret = avio_get_str16le(pb, name_len * 2, name, sizeof(name))) < name_len)
avio_skip(pb, name_len - ret); avio_skip(pb, name_len - ret);
ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name ); avpriv_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name );
} }
return 0; return 0;
......
...@@ -75,7 +75,7 @@ static AVChapter *read_chapter(AVFormatContext *s) ...@@ -75,7 +75,7 @@ static AVChapter *read_chapter(AVFormatContext *s)
end = AV_NOPTS_VALUE; end = AV_NOPTS_VALUE;
} }
return ff_new_chapter(s, s->nb_chapters, tb, start, end, NULL); return avpriv_new_chapter(s, s->nb_chapters, tb, start, end, NULL);
} }
static uint8_t *unescape(uint8_t *buf, int size) static uint8_t *unescape(uint8_t *buf, int size)
......
...@@ -225,8 +225,8 @@ int ff_add_index_entry(AVIndexEntry **index_entries, ...@@ -225,8 +225,8 @@ int ff_add_index_entry(AVIndexEntry **index_entries,
* *
* @return AVChapter or NULL on error * @return AVChapter or NULL on error
*/ */
AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base,
int64_t start, int64_t end, const char *title); int64_t start, int64_t end, const char *title);
/** /**
* Ensure the index uses less memory than the maximum specified in * Ensure the index uses less memory than the maximum specified in
......
...@@ -1599,7 +1599,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1599,7 +1599,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (chapters[i].start != AV_NOPTS_VALUE && chapters[i].uid if (chapters[i].start != AV_NOPTS_VALUE && chapters[i].uid
&& (max_start==0 || chapters[i].start > max_start)) { && (max_start==0 || chapters[i].start > max_start)) {
chapters[i].chapter = chapters[i].chapter =
ff_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000}, avpriv_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000},
chapters[i].start, chapters[i].end, chapters[i].start, chapters[i].end,
chapters[i].title); chapters[i].title);
av_dict_set(&chapters[i].chapter->metadata, av_dict_set(&chapters[i].chapter->metadata,
......
...@@ -287,7 +287,7 @@ static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -287,7 +287,7 @@ static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_read(pb, str, str_len); avio_read(pb, str, str_len);
str[str_len] = 0; str[str_len] = 0;
ff_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str); avpriv_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str);
} }
return 0; return 0;
} }
...@@ -2420,7 +2420,7 @@ static void mov_read_chapters(AVFormatContext *s) ...@@ -2420,7 +2420,7 @@ static void mov_read_chapters(AVFormatContext *s)
} }
} }
ff_new_chapter(s, i, st->time_base, sample->timestamp, end, title); avpriv_new_chapter(s, i, st->time_base, sample->timestamp, end, title);
av_freep(&title); av_freep(&title);
} }
finish: finish:
......
...@@ -416,7 +416,7 @@ static int decode_info_header(NUTContext *nut){ ...@@ -416,7 +416,7 @@ static int decode_info_header(NUTContext *nut){
if(chapter_id && !stream_id_plus1){ if(chapter_id && !stream_id_plus1){
int64_t start= chapter_start / nut->time_base_count; int64_t start= chapter_start / nut->time_base_count;
chapter= ff_new_chapter(s, chapter_id, chapter= avpriv_new_chapter(s, chapter_id,
nut->time_base[chapter_start % nut->time_base_count], nut->time_base[chapter_start % nut->time_base_count],
start, start + chapter_len, NULL); start, start + chapter_len, NULL);
metadata = &chapter->metadata; metadata = &chapter->metadata;
......
...@@ -45,7 +45,7 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val) ...@@ -45,7 +45,7 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val)
if (sscanf(val, "%02d:%02d:%02d.%03d", &h, &m, &s, &ms) < 4) if (sscanf(val, "%02d:%02d:%02d.%03d", &h, &m, &s, &ms) < 4)
return 0; return 0;
ff_new_chapter(as, cnum, (AVRational){1,1000}, avpriv_new_chapter(as, cnum, (AVRational){1,1000},
ms + 1000*(s + 60*(m + 60*h)), ms + 1000*(s + 60*(m + 60*h)),
AV_NOPTS_VALUE, NULL); AV_NOPTS_VALUE, NULL);
av_free(val); av_free(val);
......
...@@ -2739,7 +2739,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id) ...@@ -2739,7 +2739,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id)
return program; return program;
} }
AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title) AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title)
{ {
AVChapter *chapter = NULL; AVChapter *chapter = NULL;
int i; int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册