Bug fix for AVI audio when video compressor gives null frames.
This commit is contained in:
parent
b06b7a98c6
commit
52194fdf3d
|
@ -2557,7 +2557,7 @@ void AviRecordDiskThread_t::run(void)
|
|||
{
|
||||
convertRgb_32_to_24( (const unsigned char*)videoOut, rgb24,
|
||||
width, height, numPixels, true );
|
||||
writeAudio = VFW::encode_frame( rgb24, width, height ) > 0;
|
||||
VFW::encode_frame( rgb24, width, height );
|
||||
}
|
||||
#endif
|
||||
#ifdef _USE_LIBAV
|
||||
|
|
|
@ -374,9 +374,12 @@ gwavi_t::add_frame( unsigned char *buffer, size_t len, unsigned int flags)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ((t = fwrite(buffer, 1, len, out)) != len) {
|
||||
(void)fprintf(stderr, "gwavi_add_frame: fwrite() failed\n");
|
||||
return -1;
|
||||
if ( len > 0 )
|
||||
{
|
||||
if ((t = fwrite(buffer, 1, len, out)) != len) {
|
||||
(void)fprintf(stderr, "gwavi_add_frame: fwrite() failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
for (t = 0; t < maxi_pad; t++)
|
||||
|
|
Loading…
Reference in New Issue