mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-19 22:37:36 -04:00
wip
This commit is contained in:
@@ -29,8 +29,8 @@ ZMPacket::ZMPacket( ) {
|
||||
image = NULL;
|
||||
frame = NULL;
|
||||
av_init_packet( &packet );
|
||||
packet.size = 0;
|
||||
gettimeofday( ×tamp, NULL );
|
||||
packet.size = 0; // So we can detect whether it has been filled.
|
||||
timestamp = (struct timeval){0};
|
||||
}
|
||||
|
||||
ZMPacket::ZMPacket( Image *i ) {
|
||||
@@ -38,7 +38,7 @@ ZMPacket::ZMPacket( Image *i ) {
|
||||
image = i;
|
||||
frame = NULL;
|
||||
av_init_packet( &packet );
|
||||
gettimeofday( ×tamp, NULL );
|
||||
timestamp = (struct timeval){0};
|
||||
}
|
||||
|
||||
ZMPacket::ZMPacket( AVPacket *p ) {
|
||||
@@ -71,6 +71,13 @@ ZMPacket::~ZMPacket() {
|
||||
//}
|
||||
}
|
||||
|
||||
void ZMPacket::reset() {
|
||||
zm_av_packet_unref( &packet );
|
||||
if ( frame ) {
|
||||
av_frame_free( &frame );
|
||||
}
|
||||
}
|
||||
|
||||
int ZMPacket::decode( AVCodecContext *ctx ) {
|
||||
Debug(4, "about to decode video" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user