summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornkessel <hd_brummy@gentoo.org>2014-11-06 21:30:22 +0100
committerJoerg Bornkessel <hd_brummy@gentoo.org>2014-11-06 21:30:22 +0100
commit7acfd51907950e79003a2efaad18273fd03586a7 (patch)
treec3af4f3a3b2ef5466c45ea1fd7cdd78b8d10a6d4
parenteb2c6e68be094d8af8170646a1d2b063875da82c (diff)
downloadvdr-plugin-audiorecorder-7acfd51907950e79003a2efaad18273fd03586a7.tar.gz
vdr-plugin-audiorecorder-7acfd51907950e79003a2efaad18273fd03586a7.tar.bz2
warning, debug lines
-rw-r--r--convert.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/convert.c b/convert.c
index 5e37a0c..9eb7003 100644
--- a/convert.c
+++ b/convert.c
@@ -161,7 +161,9 @@ abuffer *cConvert::reencode_mpa_frame(mpeg_audio_frame *mpa_frame,
encoder_buf.length, (short *)decoder_buf.data);
/* encoder_buf.offset is used to save the size of the encoded frame */
#else
-//#error "avcodec_encode_audio2 not imlemented yet!"
+#warning "you have enabled -DAVCODEC_NEW in Makefile"
+#warning "this is still under development,"
+#warning "and will compile not working code..."
// https://www.ffmpeg.org/doxygen/1.0/group__lavc__encoding.html#gf12a9da0d33f50ff406e03572fab4763
// https://www.ffmpeg.org/doxygen/1.0/decoding__encoding_8c-source.html#l00102
/* int avcodec_encode_audio2
@@ -182,14 +184,18 @@ abuffer *cConvert::reencode_mpa_frame(mpeg_audio_frame *mpa_frame,
/* frame containing input raw audio */
frame = avcodec_alloc_frame();
if (!frame) {
- fprintf(stderr, "Could not allocate audio frame\n");
- exit(1);
+ 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) {
- fprintf(stderr, "Error encoding audio frame\n");
- exit(1);
+ dsyslog("[audiorecorder]: Error encoding audio frame (%s, " "%s())", __FILE__, __func__);
+ return;
+// fprintf(stderr, "Error encoding audio frame\n");
+// exit(1);
}
#endif
return &encoder_buf;