Fix buf
This commit is contained in:
parent
e461cfd882
commit
ca83987f14
|
|
@ -280,7 +280,8 @@ static Frame::Ptr addADTSHeader(const Frame::Ptr &frame_in, const std::string &a
|
||||||
|
|
||||||
bool AACTrack::inputFrame(const Frame::Ptr &frame) {
|
bool AACTrack::inputFrame(const Frame::Ptr &frame) {
|
||||||
if (!frame->prefixSize()) {
|
if (!frame->prefixSize()) {
|
||||||
return inputFrame_l(addADTSHeader(frame, getExtraData()->toString()));
|
CHECK(ready());
|
||||||
|
return inputFrame_l(addADTSHeader(frame, _cfg));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,12 @@ void MP4Demuxer::onVideoTrack(uint32_t track, uint8_t object, int width, int hei
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MP4Demuxer::onAudioTrack(uint32_t track_id, uint8_t object, int channel_count, int bit_per_sample, int sample_rate, const void *extra, size_t bytes) {
|
void MP4Demuxer::onAudioTrack(uint32_t track, uint8_t object, int channel_count, int bit_per_sample, int sample_rate, const void *extra, size_t bytes) {
|
||||||
auto audio = Factory::getTrackByCodecId(getCodecByMovId(object), sample_rate, channel_count, bit_per_sample / channel_count);
|
auto audio = Factory::getTrackByCodecId(getCodecByMovId(object), sample_rate, channel_count, bit_per_sample / channel_count);
|
||||||
if (!audio) {
|
if (!audio) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
_track_to_codec.emplace(track, audio);
|
||||||
if (extra && bytes) {
|
if (extra && bytes) {
|
||||||
audio->setExtraData((uint8_t *)extra, bytes);
|
audio->setExtraData((uint8_t *)extra, bytes);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue