Skip to content

Commit b996250

Browse files
author
Uoti Urpala
committed
Merge svn changes up to r30879
2 parents f5115f2 + e03ff1e commit b996250

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libmpdemux/demux_ogg.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ static int demux_ogg_get_page_stream(ogg_demuxer_t* ogg_d,ogg_stream_state** os
262262

263263
static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,float* pts,int* flags, int samplesize) {
264264
unsigned char* data = pack->packet;
265+
int size = pack->bytes;
265266

266-
*pts = 0;
267+
*pts = MP_NOPTS_VALUE;
267268
*flags = 0;
268269

269270
if(os->vorbis) {
@@ -300,7 +301,7 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,fl
300301
/* header packets begin on 1-bit: thus check (*data&0x80). We don't
301302
have theora_state st, until all header packets were passed to the
302303
decoder. */
303-
if (!(*data&0x80))
304+
if (!size || !(*data&0x80))
304305
{
305306
int keyframe_granule_shift=_ilog(os->keyframe_frequency_force-1);
306307
int64_t iframemask = (1 << keyframe_granule_shift) - 1;

0 commit comments

Comments
 (0)