This commit is contained in:
Kovid Goyal 2024-10-12 11:26:52 +05:30
parent 82655bca35
commit 522dcabb78
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -252,6 +252,8 @@ decode_audio_frame(AVFrame *input_frame, AVFormatContext *input_format_context,
if (ret == AVERROR_EOF) { r = Py_True; *finished = true; goto cleanup; } if (ret == AVERROR_EOF) { r = Py_True; *finished = true; goto cleanup; }
if (ret < 0) { averror_as_python(ret, __LINE__); goto cleanup; } if (ret < 0) { averror_as_python(ret, __LINE__); goto cleanup; }
*data_present = true; *data_present = true;
r = Py_True;
cleanup: cleanup:
av_packet_free(&input_packet); av_packet_free(&input_packet);
return r; return r;
@ -312,7 +314,6 @@ encode_audio_frame(AVFrame *frame, AVFormatContext *output_format_context, AVCod
Py_END_ALLOW_THREADS; Py_END_ALLOW_THREADS;
if (ret == AVERROR(EAGAIN)) { if (ret == AVERROR(EAGAIN)) {
goto ok; goto ok;
/* If the last frame has been encoded, stop encoding. */
} else if (ret == AVERROR_EOF) { } else if (ret == AVERROR_EOF) {
goto ok; goto ok;
} else if (ret < 0) { } else if (ret < 0) {