diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 13:15:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 13:15:58 +0200 |
commit | aa604e8e33ae06f3a106e44fff798fdd70d77230 (patch) | |
tree | de1f5670244e74d90e97b8dc69f054768c363959 /libavformat | |
parent | d312ffdd79bd22b5a051790c993eda6b1366cdfc (diff) | |
parent | 2a91ada8282f18d2807abee5188225bba1b19bda (diff) | |
download | ffmpeg-aa604e8e33ae06f3a106e44fff798fdd70d77230.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avutil: Make LZO decoder code configure-time selectable
avutil: Move memcpy_backptr() to mem.c
configure: detect parisc64 automatically
configure: detect ppc64 automatically
configure: detect mips64 automatically
configure: generalise 64-bit test
smoothstreamingenc: Don't assume streams start from timestamp 0
Conflicts:
configure
libavutil/Makefile
libavutil/lzo.c
libavutil/lzo.h
libavutil/mem.c
libavutil/mem.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskadec.c | 9 | ||||
-rw-r--r-- | libavformat/smoothstreamingenc.c | 9 |
2 files changed, 13 insertions, 5 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e23d00c4f9..c4a590b27f 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1078,6 +1078,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, memcpy(pkt_data + header_size, data, isize); break; } +#if CONFIG_LZO case MATROSKA_TRACK_ENCODING_COMP_LZO: do { olen = pkt_size *= 3; @@ -1095,6 +1096,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, } pkt_size -= olen; break; +#endif #if CONFIG_ZLIB case MATROSKA_TRACK_ENCODING_COMP_ZLIB: { z_stream zstream = {0}; @@ -1548,14 +1550,17 @@ static int matroska_read_header(AVFormatContext *s) "Multiple combined encodings not supported"); } else if (encodings_list->nb_elem == 1) { if (encodings[0].type || - (encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP && + ( #if CONFIG_ZLIB encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_ZLIB && #endif #if CONFIG_BZLIB encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_BZLIB && #endif - encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO)) { +#if CONFIG_LZO + encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO && +#endif + encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP)) { encodings[0].scope = 0; av_log(matroska->ctx, AV_LOG_ERROR, "Unsupported encoding type"); diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index df7522ee1d..1104d5853f 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -559,12 +559,15 @@ static int ism_write_packet(AVFormatContext *s, AVPacket *pkt) SmoothStreamingContext *c = s->priv_data; AVStream *st = s->streams[pkt->stream_index]; OutputStream *os = &c->streams[pkt->stream_index]; - int64_t end_pts = (c->nb_fragments + 1) * c->min_frag_duration; + int64_t end_dts = (c->nb_fragments + 1) * c->min_frag_duration; int ret; + if (st->first_dts == AV_NOPTS_VALUE) + st->first_dts = pkt->dts; + if ((!c->has_video || st->codec->codec_type == AVMEDIA_TYPE_VIDEO) && - av_compare_ts(pkt->pts, st->time_base, - end_pts, AV_TIME_BASE_Q) >= 0 && + av_compare_ts(pkt->dts - st->first_dts, st->time_base, + end_dts, AV_TIME_BASE_Q) >= 0 && pkt->flags & AV_PKT_FLAG_KEY && os->packets_written) { if ((ret = ism_flush(s, 0)) < 0) |