Skip to content

Commit

Permalink
codec_ffmpeg_audio: unify logs
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed Aug 27, 2024
1 parent ca31fe5 commit cecbd74
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Source/codec_ffmpeg_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ serprintf("cannot open codec\r\n");
av_frame_unref(aframe);
int ret = avcodec_send_packet(actx, &avpkt);
if (ret < 0) {
serprintf("%s: Failed sending packet for decoding: %s\n", __FUNCTION__, av_err2str(ret));
serprintf("%s: failed sending packet for decoding (%s)\n", __FUNCTION__, av_err2str(ret));
goto ErrorExit2;
}
ret = avcodec_receive_frame(actx, aframe);
if (ret < 0) {
serprintf("%s: Failed receiving an audio frame out of audio decoder %s\n", __FUNCTION__, av_err2str(ret));
serprintf("%s: failed receiving an audio frame from audio decoder (%s)\n", __FUNCTION__, av_err2str(ret));
goto ErrorExit2;
}

Expand Down Expand Up @@ -658,11 +658,11 @@ Dump( data, size );
av_frame_unref(p->aframe);
int ret_send = avcodec_send_packet(p->actx, &avpkt);
if (ret_send < 0) {
serprintf("%s: Failed sending packet for decoding: %s\n", __FUNCTION__, av_err2str(ret_send));
serprintf("%s: failed sending packet for decoding (%s)\n", __FUNCTION__, av_err2str(ret_send));
}
int ret_rx = avcodec_receive_frame(p->actx, p->aframe);
if (ret_rx < 0) {
serprintf("%s: Failed receiving an audio frame from audio decoder: %s\n", __FUNCTION__, av_err2str(ret_rx));
serprintf("%s: failed receiving an audio frame from audio decoder (%s)\n", __FUNCTION__, av_err2str(ret_rx));
}

if( sleep_arm ) {
Expand Down Expand Up @@ -703,7 +703,7 @@ DBGCA2 serprintf("dec %6d sam %6d byt %6d sr %5d ch %d|%llX bits %d/%d fmt
// drain the decoder, should not be necessary
int ret_rx_post = avcodec_receive_frame(p->actx, p->aframe);
if (ret_rx_post == 0) {
serprintf("%s: Got an unexpected additional audio frame %s\n", __FUNCTION__, av_err2str(ret_rx_post)));
serprintf("%s: got an unexpected additional audio frame (%s)\n", __FUNCTION__, av_err2str(ret_rx_post)));
} else {
break;
}
Expand Down Expand Up @@ -832,7 +832,7 @@ DBGCA2 serprintf("drop %5d\n", parsed );
int t1 = time_update_time();
int ret_send = avcodec_send_packet(p->actx, &avpkt);
if (ret_send < 0) {
serprintf("%s: Failed sending packet for decoding: %s\n", __FUNCTION__, av_err2str(ret_send));
serprintf("%s: failed sending packet for decoding (%s)\n", __FUNCTION__, av_err2str(ret_send));
}
int ret_rx = avcodec_receive_frame(p->actx, p->aframe);
if( sleep_arm ) {
Expand All @@ -842,7 +842,7 @@ serprintf("%s: Failed sending packet for decoding: %s\n", __FUNCTION__, av_err2s

int bytes = avpkt.size;
if ( ret_rx < 0 ) {
serprintf("%s: Failed receiving an audio frame from audio decoder: %s\n", __FUNCTION__, av_err2str(ret_rx));
serprintf("%s: failed receiving an audio frame from audio decoder (%s)\n", __FUNCTION__, av_err2str(ret_rx));
bytes = 0;
// audio_bytes = 0;
}
Expand Down Expand Up @@ -875,7 +875,7 @@ DBGCA2 serprintf("dec %6d sam %6d byt %6d sr %5d ch %d|%llX bits %d/%d fmt
// drain the decoder, should not be necessary
int ret_rx_post = avcodec_receive_frame(p->actx, p->aframe);
if (ret_rx_post == 0) {
serprintf("%s: Got an unexpected additional audio frame %s\n", __FUNCTION__, av_err2str(ret_rx_post)));
serprintf("%s: got an unexpected additional audio frame (%s)\n", __FUNCTION__, av_err2str(ret_rx_post)));
} else {
break;
}
Expand Down

0 comments on commit cecbd74

Please sign in to comment.