20
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
23
#include "libavutil/avstring.h"
25
24
#include "libavutil/bswap.h"
26
25
#include "libavutil/dict.h"
26
#include "libavutil/mathematics.h"
27
27
#include "libavutil/tree.h"
28
28
#include "avio_internal.h"
376
376
stc->time_base= &nut->time_base[stc->time_base_id];
377
av_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den);
377
avpriv_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den);
416
416
if(chapter_id && !stream_id_plus1){
417
417
int64_t start= chapter_start / nut->time_base_count;
418
chapter= ff_new_chapter(s, chapter_id,
418
chapter= avpriv_new_chapter(s, chapter_id,
419
419
nut->time_base[chapter_start % nut->time_base_count],
420
420
start, start + chapter_len, NULL);
421
421
metadata = &chapter->metadata;
458
458
set_disposition_bits(s, str_value, stream_id_plus1 - 1);
461
if(metadata && strcasecmp(name,"Uses")
462
&& strcasecmp(name,"Depends") && strcasecmp(name,"Replaces"))
461
if(metadata && av_strcasecmp(name,"Uses")
462
&& av_strcasecmp(name,"Depends") && av_strcasecmp(name,"Replaces"))
463
463
av_dict_set(metadata, name, str_value, 0);
873
873
(void **) next_node);
874
874
av_log(s, AV_LOG_DEBUG, "%"PRIu64"-%"PRIu64" %"PRId64"-%"PRId64"\n", next_node[0]->pos, next_node[1]->pos,
875
875
next_node[0]->ts , next_node[1]->ts);
876
pos= av_gen_search(s, -1, dummy.ts, next_node[0]->pos, next_node[1]->pos, next_node[1]->pos,
877
next_node[0]->ts , next_node[1]->ts, AVSEEK_FLAG_BACKWARD, &ts, nut_read_timestamp);
876
pos = ff_gen_search(s, -1, dummy.ts, next_node[0]->pos, next_node[1]->pos, next_node[1]->pos,
877
next_node[0]->ts , next_node[1]->ts, AVSEEK_FLAG_BACKWARD, &ts, nut_read_timestamp);
879
879
if(!(flags & AVSEEK_FLAG_BACKWARD)){
880
880
dummy.pos= pos+16;
881
881
next_node[1]= &nopts_sp;
882
882
av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp,
883
883
(void **) next_node);
884
pos2= av_gen_search(s, -2, dummy.pos, next_node[0]->pos , next_node[1]->pos, next_node[1]->pos,
885
next_node[0]->back_ptr, next_node[1]->back_ptr, flags, &ts, nut_read_timestamp);
884
pos2 = ff_gen_search(s, -2, dummy.pos, next_node[0]->pos , next_node[1]->pos, next_node[1]->pos,
885
next_node[0]->back_ptr, next_node[1]->back_ptr, flags, &ts, nut_read_timestamp);
888
888
//FIXME dir but I think it does not matter
924
924
#if CONFIG_NUT_DEMUXER
925
925
AVInputFormat ff_nut_demuxer = {
927
NULL_IF_CONFIG_SMALL("NUT format"),
927
.long_name = NULL_IF_CONFIG_SMALL("NUT format"),
928
.priv_data_size = sizeof(NUTContext),
929
.read_probe = nut_probe,
930
.read_header = nut_read_header,
931
.read_packet = nut_read_packet,
932
.read_close = nut_read_close,
933
.read_seek = read_seek,
934
934
.extensions = "nut",
935
935
.codec_tag = (const AVCodecTag * const []) { ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 },