Merge branch 'release/0.7' into oldabi
* release/0.7: (290 commits) nuv: Fix combination of size changes and LZO compression. av_lzo1x_decode: properly handle negative buffer length. Do not call parse_keyframes_index with NULL stream. update versions for 0.7 branch Version numbers for 0.8.6 snow: emu edge support Fixes Ticket592 imc: validate channel count imc: check for ff_fft_init() failure (cherry picked from commit95fee70d67
) libgsmdec: check output buffer size before decoding (cherry picked from commitb03761b130
) configure: fix arch x86_32 mp3enc: avoid truncating id3v1 tags by one byte asfdec: Check packet_replic_size earlier cin audio: validate the channel count binkaudio: add some buffer overread checks. atrac1: validate number of channels (cherry picked from commitbff5b2c1ca
) atrac1: check output buffer size before decoding (cherry picked from commit33684b9c12
) vp3: fix oob read for negative tokens and memleaks on error. (cherry picked from commit8370e426e4
) apedec: set s->currentframeblocks after validating nblocks apedec: use unsigned int for 'nblocks' and make sure that it's within int range apedec: check for data buffer realloc failure (cherry picked from commit11ca8b2d74
) ... Conflicts: Changelog Makefile RELEASE configure libavcodec/error_resilience.c libavcodec/mpegvideo.c libavformat/matroskaenc.c tests/ref/lavf/mxf Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -2481,9 +2481,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
|
||||
}
|
||||
{
|
||||
int64_t last = st->info->last_dts;
|
||||
int64_t duration= pkt->dts - last;
|
||||
|
||||
if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){
|
||||
if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && pkt->dts > last){
|
||||
int64_t duration= pkt->dts - last;
|
||||
double dur= duration * av_q2d(st->time_base);
|
||||
|
||||
// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
@@ -2748,16 +2748,16 @@ void avformat_free_context(AVFormatContext *s)
|
||||
av_free_packet(&st->cur_pkt);
|
||||
}
|
||||
av_dict_free(&st->metadata);
|
||||
av_free(st->index_entries);
|
||||
av_free(st->codec->extradata);
|
||||
av_free(st->codec->subtitle_header);
|
||||
av_free(st->codec);
|
||||
av_freep(&st->index_entries);
|
||||
av_freep(&st->codec->extradata);
|
||||
av_freep(&st->codec->subtitle_header);
|
||||
av_freep(&st->codec);
|
||||
#if FF_API_OLD_METADATA
|
||||
av_free(st->filename);
|
||||
av_freep(&st->filename);
|
||||
#endif
|
||||
av_free(st->priv_data);
|
||||
av_free(st->info);
|
||||
av_free(st);
|
||||
av_freep(&st->priv_data);
|
||||
av_freep(&st->info);
|
||||
av_freep(&st);
|
||||
}
|
||||
for(i=s->nb_programs-1; i>=0; i--) {
|
||||
#if FF_API_OLD_METADATA
|
||||
@@ -2775,7 +2775,7 @@ void avformat_free_context(AVFormatContext *s)
|
||||
av_free(s->chapters[s->nb_chapters]->title);
|
||||
#endif
|
||||
av_dict_free(&s->chapters[s->nb_chapters]->metadata);
|
||||
av_free(s->chapters[s->nb_chapters]);
|
||||
av_freep(&s->chapters[s->nb_chapters]);
|
||||
}
|
||||
av_freep(&s->chapters);
|
||||
av_metadata_free(&s->metadata);
|
||||
@@ -3071,7 +3071,9 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
}
|
||||
if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){
|
||||
if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)
|
||||
&& FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(st->codec->sample_aspect_ratio)) > 0.004*av_q2d(st->sample_aspect_ratio)
|
||||
){
|
||||
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
@@ -3566,7 +3568,7 @@ void av_dump_format(AVFormatContext *ic,
|
||||
int is_output)
|
||||
{
|
||||
int i;
|
||||
uint8_t *printed = av_mallocz(ic->nb_streams);
|
||||
uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
|
||||
if (ic->nb_streams && !printed)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user