"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavformat/mov.c" between
libav-11.7.tar.gz and libav-11.8.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

mov.c  (libav-11.7):mov.c  (libav-11.8)
skipping to change at line 1972 skipping to change at line 1972
unsigned int stss_index = 0; unsigned int stss_index = 0;
unsigned int stps_index = 0; unsigned int stps_index = 0;
unsigned int i, j; unsigned int i, j;
uint64_t stream_size = 0; uint64_t stream_size = 0;
/* adjust first dts according to edit list */ /* adjust first dts according to edit list */
if (sc->time_offset && mov->time_scale > 0) { if (sc->time_offset && mov->time_scale > 0) {
if (sc->time_offset < 0) if (sc->time_offset < 0)
sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->t ime_scale); sc->time_offset = av_rescale(sc->time_offset, sc->time_scale, mov->t ime_scale);
current_dts = -sc->time_offset; current_dts = -sc->time_offset;
if (sc->ctts_data && sc->stts_data && sc->stts_data[0].duration &&
sc->ctts_data[0].duration / sc->stts_data[0].duration > 16) {
/* more than 16 frames delay, dts are likely wrong
this happens with files created by iMovie */
sc->wrong_dts = 1;
st->codec->has_b_frames = 1;
}
} }
/* only use old uncompressed audio chunk demuxing when stts specifies it */ /* only use old uncompressed audio chunk demuxing when stts specifies it */
if (!(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && if (!(st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
sc->stts_count == 1 && sc->stts_data[0].duration == 1)) { sc->stts_count == 1 && sc->stts_data[0].duration == 1)) {
unsigned int current_sample = 0; unsigned int current_sample = 0;
unsigned int stts_sample = 0; unsigned int stts_sample = 0;
unsigned int sample_size; unsigned int sample_size;
unsigned int distance = 0; unsigned int distance = 0;
unsigned int rap_group_index = 0; unsigned int rap_group_index = 0;
skipping to change at line 3257 skipping to change at line 3250
pkt->dts = sample->timestamp; pkt->dts = sample->timestamp;
if (sc->ctts_data && sc->ctts_index < sc->ctts_count) { if (sc->ctts_data && sc->ctts_index < sc->ctts_count) {
pkt->pts = pkt->dts + sc->dts_shift + sc->ctts_data[sc->ctts_index].dura tion; pkt->pts = pkt->dts + sc->dts_shift + sc->ctts_data[sc->ctts_index].dura tion;
/* update ctts context */ /* update ctts context */
sc->ctts_sample++; sc->ctts_sample++;
if (sc->ctts_index < sc->ctts_count && if (sc->ctts_index < sc->ctts_count &&
sc->ctts_data[sc->ctts_index].count == sc->ctts_sample) { sc->ctts_data[sc->ctts_index].count == sc->ctts_sample) {
sc->ctts_index++; sc->ctts_index++;
sc->ctts_sample = 0; sc->ctts_sample = 0;
} }
if (sc->wrong_dts)
pkt->dts = AV_NOPTS_VALUE;
} else { } else {
int64_t next_dts = (sc->current_sample < st->nb_index_entries) ? int64_t next_dts = (sc->current_sample < st->nb_index_entries) ?
st->index_entries[sc->current_sample].timestamp : st->duration; st->index_entries[sc->current_sample].timestamp : st->duration;
pkt->duration = next_dts - pkt->dts; pkt->duration = next_dts - pkt->dts;
pkt->pts = pkt->dts; pkt->pts = pkt->dts;
} }
if (st->discard == AVDISCARD_ALL) if (st->discard == AVDISCARD_ALL)
goto retry; goto retry;
pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0; pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0;
pkt->pos = sample->pos; pkt->pos = sample->pos;
 End of changes. 2 change blocks. 
9 lines changed or deleted 0 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS