we should be queueing packets regardless of recording state
This commit is contained in:
parent
fbc0729c83
commit
d4645cd94a
|
@ -650,19 +650,20 @@ Debug(5, "After av_read_frame (%d)", ret );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Not recording
|
||||||
if ( videoStore ) {
|
if ( videoStore ) {
|
||||||
Info("Deleting videoStore instance");
|
Info("Deleting videoStore instance");
|
||||||
delete videoStore;
|
delete videoStore;
|
||||||
videoStore = NULL;
|
videoStore = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Buffer video packets
|
|
||||||
if ( packet->flags & AV_PKT_FLAG_KEY ) {
|
|
||||||
packetqueue.clearQueue();
|
|
||||||
}
|
|
||||||
packetqueue.queuePacket(packet);
|
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
|
//Buffer video packets
|
||||||
|
if ( packet->flags & AV_PKT_FLAG_KEY ) {
|
||||||
|
packetqueue.clearQueue();
|
||||||
|
}
|
||||||
|
packetqueue.queuePacket(packet);
|
||||||
|
|
||||||
if ( packet->stream_index == mVideoStreamId ) {
|
if ( packet->stream_index == mVideoStreamId ) {
|
||||||
ret = zm_avcodec_decode_video( mVideoCodecContext, mRawFrame, &frameComplete, packet );
|
ret = zm_avcodec_decode_video( mVideoCodecContext, mRawFrame, &frameComplete, packet );
|
||||||
if ( ret < 0 ) {
|
if ( ret < 0 ) {
|
||||||
|
|
Loading…
Reference in New Issue