X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Ffileac3.C;h=99ba4e5cc2c921d49eab52c8cbb71c4e6d7c53e2;hb=a3a59f63fdfbcf94c561595f515951fdfd4bea30;hp=44cc26104108c76821e003aecba321a8fc5ccdd7;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/fileac3.C b/cinelerra-5.0/cinelerra/fileac3.C index 44cc2610..99ba4e5c 100644 --- a/cinelerra-5.0/cinelerra/fileac3.C +++ b/cinelerra-5.0/cinelerra/fileac3.C @@ -44,7 +44,6 @@ extern "C" #include "file.h" #include "filempeg.h" #include "language.h" -#include "mwindow.inc" #include "mainerror.h" @@ -297,11 +296,10 @@ int FileAC3::write_samples(double **buffer, int64_t len) file->get_audio_position() : AV_NOPTS_VALUE ; int got_packet = 0; ret = avcodec_encode_audio2(avctx, &avpkt, frame, &got_packet); - if( !ret ) { - if(got_packet && avctx->coded_frame) { - avctx->coded_frame->pts = avpkt.pts; - avctx->coded_frame->key_frame = !!(avpkt.flags & AV_PKT_FLAG_KEY); - } + if( ret < 0 ) { + char errmsg[BCSTRLEN]; + av_strerror(ret, errmsg, sizeof(errmsg)); + fprintf(stderr, "avcodec_encode_audio2 failed. \n%s\n", errmsg); } } av_packet_free_side_data(&avpkt);