summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-26 03:10:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-26 03:10:27 +0100
commit2139e584391b6db7ad315cf4f6443f87f7813d51 (patch)
tree5c1b2a1a888ca0b25f884add55c9647d30fc19ed
parentdf43d03731c138bb113a66fd9c1b4d8cf2d879e5 (diff)
downloadffmpeg-streaming-2139e584391b6db7ad315cf4f6443f87f7813d51.zip
ffmpeg-streaming-2139e584391b6db7ad315cf4f6443f87f7813d51.tar.gz
avformat/dv: fix used dimension variables
Fixes null pointer dereference during seeking Fixes Ticket4395 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/dv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 485a5f8..8500228 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -422,8 +422,8 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c,
int64_t timestamp, int flags)
{
// FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk)
- const AVDVProfile *sys = av_dv_codec_profile2(c->vst->codec->width, c->vst->codec->height,
- c->vst->codec->pix_fmt, c->vst->codec->time_base);
+ const AVDVProfile *sys = av_dv_codec_profile2(c->vst->codec->coded_width, c->vst->codec->coded_height,
+ c->vst->codec->pix_fmt, c->vst->codec->time_base);
int64_t offset;
int64_t size = avio_size(s->pb) - s->internal->data_offset;
int64_t max_offset = ((size - 1) / sys->frame_size) * sys->frame_size;
OpenPOWER on IntegriCloud