if (!ResetForPacket(packet.get())) {
LOG(ERROR) << "Encoder initialization failed";
- return scoped_ptr<AudioPacket>();
+ return nullptr;
}
int samples_in_packet = packet->data(0).size() / kBytesPerSample / channels_;
buffer, data->length());
if (result < 0) {
LOG(ERROR) << "opus_encode() failed with error code: " << result;
- return scoped_ptr<AudioPacket>();
+ return nullptr;
}
DCHECK_LE(result, static_cast<int>(data->length()));
// Return NULL if there's nothing in the packet.
if (encoded_packet->data_size() == 0)
- return scoped_ptr<AudioPacket>();
+ return nullptr;
return encoded_packet.Pass();
}