Do not write an audio packet if the encoder has not produced
any encoded data yet. Fixes encoding of Vorbis audio. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38850 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
43821aaf68
commit
8218710526
@ -531,6 +531,8 @@ AVCodecEncoder::_EncodeAudio(const uint8* buffer, size_t bufferSize,
|
||||
TRACE(" avcodec_encode_video() failed: %d\n", usedBytes);
|
||||
return B_ERROR;
|
||||
}
|
||||
if (usedBytes == 0)
|
||||
return B_OK;
|
||||
|
||||
// Maybe we need to use this PTS to calculate start_time:
|
||||
if (fContext->coded_frame->pts != kNoPTSValue) {
|
||||
|
Loading…
Reference in New Issue
Block a user