Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas

pull/2077/head
Isaac Connor 2017-08-15 12:55:07 -04:00
commit 0775725a76
1 changed files with 6 additions and 3 deletions

View File

@ -186,6 +186,7 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
} }
} }
converted_input_samples = NULL;
audio_output_codec = NULL; audio_output_codec = NULL;
audio_input_context = NULL; audio_input_context = NULL;
audio_output_stream = NULL; audio_output_stream = NULL;
@ -324,16 +325,17 @@ VideoStore::~VideoStore(){
while ( 1 ) { while ( 1 ) {
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0) #if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
#if 0 // Put encoder into flushing mode
ret = avcodec_send_frame( audio_output_context, NULL ); ret = avcodec_send_frame( audio_output_context, NULL );
if ( ret < 0 ) { if ( ret < 0 ) {
Error("Error sending flush to encoder (%d) (%s)", ret, av_err2str( ret )); Error("Error sending flush to encoder (%d) (%s)", ret, av_err2str( ret ));
break; break;
} }
#endif
ret = avcodec_receive_packet( audio_output_context, &pkt ); ret = avcodec_receive_packet( audio_output_context, &pkt );
if ( ret < 0 ) { if ( ret < 0 ) {
Error("ERror encoding audio while flushing (%d) (%s)", ret, av_err2str( ret )); if ( EOF != ret ) {
Error("ERror encoding audio while flushing (%d) (%s)", ret, av_err2str( ret ));
}
break; break;
} }
#else #else
@ -380,6 +382,7 @@ VideoStore::~VideoStore(){
if ( video_output_stream ) { if ( video_output_stream ) {
avcodec_close(video_output_context); avcodec_close(video_output_context);
video_output_context = NULL; video_output_context = NULL;
Debug(4, "Success freeing video_output_context");
} }
if (audio_output_stream) { if (audio_output_stream) {
avcodec_close(audio_output_context); avcodec_close(audio_output_context);