From: Michael Niedermayer Date: Fri, 4 May 2012 22:44:48 +0000 (+0200) Subject: Merge remote-tracking branch 'qatar/master' X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=bce42e95d13e3cc9c32bcd75d127c0152e51471d;p=ffmpeg Merge remote-tracking branch 'qatar/master' * qatar/master: configure: add POWER[5-7] support arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6 vqavideo: return error if image size is not a multiple of block size cosmetics: indentation avformat: only fill-in interpolated timestamps if duration is non-zero avformat: remove a workaround for broken timestamps Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer --- bce42e95d13e3cc9c32bcd75d127c0152e51471d diff --cc libavcodec/vqavideo.c index dcd81c73c5b,dc58b60004e..6874b75201b --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@@ -155,6 -151,12 +155,11 @@@ static av_cold int vqa_decode_init(AVCo return -1; } - if (s->width & (s->vector_width - 1) || - s->height & (s->vector_height - 1)) { ++ if (s->width % s->vector_width || s->height % s->vector_height) { + av_log(avctx, AV_LOG_ERROR, "Image size not multiple of block size\n"); + return AVERROR_INVALIDDATA; + } + /* allocate codebooks */ s->codebook_size = MAX_CODEBOOK_SIZE; s->codebook = av_malloc(s->codebook_size); diff --cc libavformat/utils.c index d9dc2fb7317,658da8f9510..fd9e4d53094 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@@ -1081,15 -985,19 +1081,16 @@@ static void compute_pkt_fields(AVFormat } } - if (pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE || - duration) { - /* presentation is not delayed : PTS and DTS are the same */ - if (pkt->pts == AV_NOPTS_VALUE) - pkt->pts = pkt->dts; - update_initial_timestamps(s, pkt->stream_index, pkt->pts, - pkt->pts); - if (pkt->pts == AV_NOPTS_VALUE) - pkt->pts = st->cur_dts; - pkt->dts = pkt->pts; - if (pkt->pts != AV_NOPTS_VALUE) - st->cur_dts = pkt->pts + duration; - } + /* presentation is not delayed : PTS and DTS are the same */ - if(pkt->pts == AV_NOPTS_VALUE) ++ if (pkt->pts == AV_NOPTS_VALUE) + pkt->pts = pkt->dts; - update_initial_timestamps(s, pkt->stream_index, pkt->pts, pkt->pts); - if(pkt->pts == AV_NOPTS_VALUE) ++ update_initial_timestamps(s, pkt->stream_index, pkt->pts, ++ pkt->pts); ++ if (pkt->pts == AV_NOPTS_VALUE) + pkt->pts = st->cur_dts; + pkt->dts = pkt->pts; - if(pkt->pts != AV_NOPTS_VALUE) ++ if (pkt->pts != AV_NOPTS_VALUE) + st->cur_dts = pkt->pts + duration; } }