diff options
author | Joerg Bornkessel <hd_brummy@gentoo.org> | 2014-11-07 17:09:28 +0100 |
---|---|---|
committer | Joerg Bornkessel <hd_brummy@gentoo.org> | 2014-11-07 17:09:28 +0100 |
commit | 3cd71c419d190a517f9ce2a1e9a502d4118d8c20 (patch) | |
tree | 36594e59fa5d33863f7e2c1be0cbf145e045c0b5 | |
parent | f8fdb9551fbdb63a9b05d83b85ea3d20a793efa8 (diff) | |
download | vdr-plugin-audiorecorder-3cd71c419d190a517f9ce2a1e9a502d4118d8c20.tar.gz vdr-plugin-audiorecorder-3cd71c419d190a517f9ce2a1e9a502d4118d8c20.tar.bz2 |
cleaner code
-rw-r--r-- | convert.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -174,29 +174,15 @@ abuffer *cConvert::reencode_mpa_frame(mpeg_audio_frame *mpa_frame, int * got_packet_ptr ) */ AVCodecContext *codec_ctx; - AVFrame *frame; + AVFrame *frame = avcodec_alloc_frame; // libav10 av_frame_alloc AVPacket avpkt; av_init_packet(&avpkt); avpkt.data = mpa_frame->data; avpkt.size = mpa_frame->length; int ret, got_output; - /* frame containing input raw audio */ - frame = avcodec_alloc_frame(); - if (! frame) { - dsyslog("[audiorecorder]: Could not allocate audio frame (%s, " "%s())", __FILE__, __func__); -// return; -// fprintf(stderr, "Could not allocate audio frame\n"); - exit(1); - } encoder_buf.offset = avcodec_encode_audio2(encoder_ctx, &avpkt, frame, &got_output); - if ( ret < 0 ) { - dsyslog("[audiorecorder]: Error encoding audio frame (%s, " "%s())", __FILE__, __func__); -// return; -// fprintf(stderr, "Error encoding audio frame\n"); - exit(1); - } #endif return &encoder_buf; } |