+ // if this isn't the video stream or we don't
+ // have audio yet then generate a new scr
+ if ( st != r->stream_timing ||
+ r->stream_timing[1].id == -1 )
+ {
+ new_scr_offset( r, buf );
+ }
+ else
+ {
+ // defer the scr change until we get some
+ // audio since audio has a timestamp per
+ // frame but video doesn't. Clear the timestamps
+ // so the decoder will regenerate them from
+ // the frame durations.
+ buf->start = -1;
+ buf->renderOffset = -1;
+ }