summaryrefslogtreecommitdiffstats
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2011-11-06 01:50:29 +0100
committerMichael Niedermayer <[email protected]>2011-11-06 01:50:29 +0100
commit603a282f8ff1a84677fc0279b6d83e4a23729675 (patch)
tree08060d5f3901ac2b7373f0d97854d457519956ee /libavformat/oggdec.c
parent39c8434bced9a860388628e624170665ddff0e44 (diff)
parent973d752dfbfb3286c6494f99744f386b98fda4d7 (diff)
Merge remote-tracking branch 'qatar/release/0.6' into release/0.6
* qatar/release/0.6: update version Release notes and changelog for 0.6.3 Fix memory (re)allocation in matroskadec.c, related to MSVR-11-0080. cavs: fix some crashes with invalid bitstreams libvo-aacenc: Sync up with 0.7.2 Fix MMX rgb24 to yuv conversion with gcc 4.6 oggdec: prevent heap corruption. Fix ff_imdct_calc_sse() on gcc-4.6 backport libvo-aacenc wrapper for aac encoding Conflicts: Changelog VERSION Merged-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 3161e68c6c..76b28ab212 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -577,20 +577,19 @@ ogg_read_close (AVFormatContext * s)
}
-static int64_t
-ogg_read_timestamp (AVFormatContext * s, int stream_index, int64_t * pos_arg,
- int64_t pos_limit)
+static int64_t ogg_read_timestamp (AVFormatContext * s, int stream_index,
+ int64_t * pos_arg, int64_t pos_limit)
{
struct ogg *ogg = s->priv_data;
- struct ogg_stream *os = ogg->streams + stream_index;
ByteIOContext *bc = s->pb;
int64_t pts = AV_NOPTS_VALUE;
- int i;
+ int i = -1;
url_fseek(bc, *pos_arg, SEEK_SET);
ogg_reset(ogg);
while (url_ftell(bc) < pos_limit && !ogg_packet(s, &i, NULL, NULL, pos_arg)) {
if (i == stream_index) {
+ struct ogg_stream *os = ogg->streams + stream_index;
pts = ogg_calc_pts(s, i, NULL);
if (os->keyframe_seek && !(os->pflags & AV_PKT_FLAG_KEY))
pts = AV_NOPTS_VALUE;
@@ -615,6 +614,7 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
os->keyframe_seek = 1;
ret = av_seek_frame_binary(s, stream_index, timestamp, flags);
+ os = ogg->streams + stream_index;
if (ret < 0)
os->keyframe_seek = 0;
return ret;