Merge pull request #1143 from SteveGilvarry/FixBuildWarnings

Fix build warnings specific to h264 branch
This commit is contained in:
Steve Gilvarry 2015-11-05 01:46:50 +11:00
commit cb19113c88
3 changed files with 8 additions and 5 deletions

View File

@ -456,7 +456,7 @@ bool Event::WriteFrameVideo( const Image *image, const struct timeval timestamp,
unsigned int timeMS = (delta_time3.sec * delta_time3.prec) + delta_time3.fsec;
/* Encode and write the frame */
if(videowriter->Encode(image, timeMS) != 0) {
if(videowriter->Encode(frameimg, timeMS) != 0) {
Error("Failed encoding video frame");
}

View File

@ -614,10 +614,10 @@ int FfmpegCamera::CaptureAndRecord( Image &image, bool recording, char* event_fi
if(videoStore && recording){
//Write the packet to our video store
int ret = videoStore->writeAudioFramePacket(&packet, mFormatContext->streams[packet.stream_index]); //FIXME no relevance of last key frame
/*if(ret<0){//Less than zero and we skipped a frame
if(ret<0){//Less than zero and we skipped a frame
av_free_packet( &packet );
return 0; //FIXME av_free_packet not called
}*/
return 0;
}
}
}
av_free_packet( &packet );

View File

@ -19,8 +19,11 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
#define __STDC_FORMAT_MACROS 1
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "zm.h"
#include "zm_videostore.h"
@ -151,7 +154,7 @@ VideoStore::~VideoStore(){
void VideoStore::dumpPacket( AVPacket *pkt ){
char b[10240];
snprintf(b, sizeof(b), " pts: %lld, dts: %lld, data: %p, size: %d, sindex: %d, dflags: %04x, s-pos: %lld, c-duration: %lld\n"
snprintf(b, sizeof(b), " pts: %" PRId64 ", dts: %" PRId64 ", data: %p, size: %d, sindex: %d, dflags: %04x, s-pos: %" PRId64 ", c-duration: %" PRId64 "\n"
, pkt->pts
, pkt->dts
, pkt->data