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:
@@ -531,6 +531,8 @@ AVCodecEncoder::_EncodeAudio(const uint8* buffer, size_t bufferSize,
|
|||||||
TRACE(" avcodec_encode_video() failed: %d\n", usedBytes);
|
TRACE(" avcodec_encode_video() failed: %d\n", usedBytes);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
if (usedBytes == 0)
|
||||||
|
return B_OK;
|
||||||
|
|
||||||
// Maybe we need to use this PTS to calculate start_time:
|
// Maybe we need to use this PTS to calculate start_time:
|
||||||
if (fContext->coded_frame->pts != kNoPTSValue) {
|
if (fContext->coded_frame->pts != kNoPTSValue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user