Merge remote-tracking branch 'jamrial/release/2.0' into release/2.0
* jamrial/release/2.0: avformat/matroskadec: check out_samplerate before using it in av_rescale() matroskadec: Improve TTA duration calculation avformat/oggparsevorbis: fix leak of tt avformat/oggparsevorbis: fix leak of ct Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1737,8 +1737,10 @@ static int matroska_read_header(AVFormatContext *s)
|
||||
avio_wl16(&b, 1);
|
||||
avio_wl16(&b, track->audio.channels);
|
||||
avio_wl16(&b, track->audio.bitdepth);
|
||||
if (track->audio.out_samplerate < 0 || track->audio.out_samplerate > INT_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
avio_wl32(&b, track->audio.out_samplerate);
|
||||
avio_wl32(&b, matroska->ctx->duration * track->audio.out_samplerate);
|
||||
avio_wl32(&b, av_rescale((matroska->duration * matroska->time_scale), track->audio.out_samplerate, AV_TIME_BASE * 1000));
|
||||
} else if (codec_id == AV_CODEC_ID_RV10 || codec_id == AV_CODEC_ID_RV20 ||
|
||||
codec_id == AV_CODEC_ID_RV30 || codec_id == AV_CODEC_ID_RV40) {
|
||||
extradata_offset = 26;
|
||||
|
@@ -136,11 +136,15 @@ ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, in
|
||||
|
||||
if (!pict) {
|
||||
av_log(as, AV_LOG_WARNING, "out-of-memory error. Skipping cover art block.\n");
|
||||
av_freep(&tt);
|
||||
av_freep(&ct);
|
||||
continue;
|
||||
}
|
||||
if ((ret = av_base64_decode(pict, ct, vl)) > 0)
|
||||
ret = ff_flac_parse_picture(as, pict, ret);
|
||||
av_freep(&pict);
|
||||
av_freep(&tt);
|
||||
av_freep(&ct);
|
||||
if (ret < 0) {
|
||||
av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user