diff options
author | James Almer <jamrial@gmail.com> | 2017-03-21 17:02:30 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-21 17:02:30 -0300 |
commit | 4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch) | |
tree | ff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/rsd.c | |
parent | 423375d4f06ae7103e575a31c23e62e3ba440845 (diff) | |
parent | 83548fe894cdb455cc127f754d09905b6d23c173 (diff) | |
download | ffmpeg-4de591e6fb7361bd417dcd9563672ed0ad8b361b.tar.gz |
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173':
lavf: fix usage of AVIOContext.seekable
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/rsd.c')
-rw-r--r-- | libavformat/rsd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/rsd.c b/libavformat/rsd.c index 5a56e72bb3..27a3d73981 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -106,12 +106,12 @@ static int rsd_read_header(AVFormatContext *s) break; case AV_CODEC_ID_ADPCM_PSX: par->block_align = 16 * par->channels; - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) st->duration = av_get_audio_frame_duration2(par, avio_size(pb) - start); break; case AV_CODEC_ID_ADPCM_IMA_RAD: par->block_align = 20 * par->channels; - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) st->duration = av_get_audio_frame_duration2(par, avio_size(pb) - start); break; case AV_CODEC_ID_ADPCM_IMA_WAV: @@ -120,7 +120,7 @@ static int rsd_read_header(AVFormatContext *s) par->bits_per_coded_sample = 4; par->block_align = 36 * par->channels; - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) st->duration = av_get_audio_frame_duration2(par, avio_size(pb) - start); break; case AV_CODEC_ID_ADPCM_THP_LE: @@ -131,7 +131,7 @@ static int rsd_read_header(AVFormatContext *s) if ((ret = ff_get_extradata(s, par, s->pb, 32)) < 0) return ret; - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) st->duration = av_get_audio_frame_duration2(par, avio_size(pb) - start); break; case AV_CODEC_ID_ADPCM_THP: @@ -145,7 +145,7 @@ static int rsd_read_header(AVFormatContext *s) avio_read(s->pb, st->codecpar->extradata + 32 * i, 32); avio_skip(s->pb, 8); } - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) st->duration = (avio_size(pb) - start) / (8 * par->channels) * 14; break; case AV_CODEC_ID_PCM_S16LE: @@ -153,7 +153,7 @@ static int rsd_read_header(AVFormatContext *s) if (version != 4) start = avio_rl32(pb); - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) st->duration = (avio_size(pb) - start) / 2 / par->channels; break; } |