Keyframe indication in single NAL unit packet.

cusax-fix
Sebastien Vincent 16 years ago
parent cd9fbfdcd4
commit 69607b232f

@ -304,6 +304,14 @@ private int dePacketizeSingleNALUnitPacket(
outBuffer.setLength(newOutLength);
/* coded slice of an IDR picture (keyframe) */
if(nal_unit_type == 5)
{
/* keyframe received */
missFrame = false;
lastReceivedKeyframeTime = System.currentTimeMillis();
}
return BUFFER_PROCESSED_OK;
}

@ -245,7 +245,7 @@ public synchronized void open()
// average bit rate
FFmpeg.avcodeccontext_set_bit_rate(avcontext, bitRate);
// so to be 1 in x264
FFmpeg.avcodeccontext_set_bit_rate_tolerance(avcontext, (int)(bitRate /
FFmpeg.avcodeccontext_set_bit_rate_tolerance(avcontext, (bitRate /
frameRate));
FFmpeg.avcodeccontext_set_rc_max_rate(avcontext, bitRate);
FFmpeg.avcodeccontext_set_sample_aspect_ratio(avcontext, 0, 0);

Loading…
Cancel
Save