#include "file.h"
#include "filempeg.h"
#include "language.h"
-#include "mwindow.inc"
#include "mainerror.h"
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);