]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix - Audio transcoding not working #1663
authoruknunknown <alin_gherghescu@yahoo.com>
Fri, 13 Sep 2024 04:38:47 +0000 (21:38 -0700)
committerFlole <Flole998@users.noreply.github.com>
Sat, 28 Sep 2024 13:39:27 +0000 (15:39 +0200)
src/transcoding/transcode/helpers.c  : pktbuf_len(self->input_gh)) will be 0 (empty) so will return error -11 (AVERROR(EAGAIN) for audio streams.

src/transcoding/transcode/helpers.c

index 1d129c723a2eb668f20582455ab091693ad47dc0..025512f63c695548eb2636ed5f77ed166a5a074b 100644 (file)
@@ -81,14 +81,15 @@ tvh_context_helper_find(struct TVHContextHelpers *list, const AVCodec *codec)
 
 /* decoders ================================================================= */
 
-/* shared by H264, AAC and VORBIS */
+/* shared by H264, THEORA, AAC, VORBIS and OPUS */
 static int
 tvh_extradata_open(TVHContext *self, AVDictionary **opts)
 {
     size_t extradata_size = 0;
 
     if (!(extradata_size = pktbuf_len(self->input_gh))) {
-        return AVERROR(EAGAIN);
+        // most audio streams don't have input_gh
+        return 0;
     }
     if (extradata_size >= TVH_INPUT_BUFFER_MAX_SIZE) {
         tvh_context_log(self, LOG_ERR, "extradata too big");