mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Fix FFmpeg frame generator ending.
This commit is contained in:
parent
b0203af398
commit
ab25cf214c
1 changed files with 14 additions and 14 deletions
|
@ -343,10 +343,10 @@ void FrameGenerator::Impl::readNextFrame() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} while (packet.fields().stream_index != _streamId);
|
} while (packet.fields().stream_index != _streamId);
|
||||||
if (finished) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (finished) {
|
||||||
|
result = avcodec_send_packet(_codec.get(), nullptr); // Drain.
|
||||||
|
} else {
|
||||||
const auto native = &packet.fields();
|
const auto native = &packet.fields();
|
||||||
const auto guard = gsl::finally([
|
const auto guard = gsl::finally([
|
||||||
&,
|
&,
|
||||||
|
@ -357,8 +357,8 @@ void FrameGenerator::Impl::readNextFrame() {
|
||||||
native->data = data;
|
native->data = data;
|
||||||
packet = Packet();
|
packet = Packet();
|
||||||
});
|
});
|
||||||
|
|
||||||
result = avcodec_send_packet(_codec.get(), native);
|
result = avcodec_send_packet(_codec.get(), native);
|
||||||
|
}
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
LOG(("Webm Error: Unable to avcodec_send_packet(), ")
|
LOG(("Webm Error: Unable to avcodec_send_packet(), ")
|
||||||
+ wrapError(result));
|
+ wrapError(result));
|
||||||
|
|
Loading…
Add table
Reference in a new issue