summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 03:19:58 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 03:20:23 +0200
commitb996250a2a5e901b1f2429edf143a1c420047e3d (patch)
treea7b9cc66e5a58e8179b07605c652655f4bde351b
parentf5115f249ceeda10ebcfc9e3d53259ecb5810505 (diff)
parente03ff1e0ef9be7da0fbd1e4d6b2bad72b1610278 (diff)
downloadmpv-b996250a2a5e901b1f2429edf143a1c420047e3d.tar.bz2
mpv-b996250a2a5e901b1f2429edf143a1c420047e3d.tar.xz
Merge svn changes up to r30879
-rw-r--r--libmpdemux/demux_ogg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index aa3dfdae80..840e53fe02 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -262,8 +262,9 @@ static int demux_ogg_get_page_stream(ogg_demuxer_t* ogg_d,ogg_stream_state** os
static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,float* pts,int* flags, int samplesize) {
unsigned char* data = pack->packet;
+ int size = pack->bytes;
- *pts = 0;
+ *pts = MP_NOPTS_VALUE;
*flags = 0;
if(os->vorbis) {
@@ -300,7 +301,7 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,fl
/* header packets begin on 1-bit: thus check (*data&0x80). We don't
have theora_state st, until all header packets were passed to the
decoder. */
- if (!(*data&0x80))
+ if (!size || !(*data&0x80))
{
int keyframe_granule_shift=_ilog(os->keyframe_frequency_force-1);
int64_t iframemask = (1 << keyframe_granule_shift) - 1;