Hi, On 12/11/17 20:32, Robert Luberda wrote: > Package: ffmpeg > Version: 7:3.4-2 > Severity: important > > The latest ffmpeg makes sound in kodi to be scratchy, i.e. containing some > additional noise that makes watching videos in kodi uncomfortable/annoying. > > Downgrading ffmpeg and dependent libraries to version 3.3.4-2+b3 fixes the > issue (makes sound in kodi clear).
This is likely to be related to #879673 / #881286 which has a workaround which I hoped would work, but doesn't seem to in every case. I can reproduce the bug, but only for videos containing aac audio and only in kodi. I have attached a LD_PRELOAD shim which will cause any drain packets sent to avcodec_decode_audio4 to be dropped (see the above bugs and links for why this may be relevant). Could you compile it and run kodi like this: gcc -shared shim.c -olibshim.so LD_PRELOAD=$(pwd)/libshim.so kodi-standalone If that fixes your audio problems, then this is almost certainly #881286 in kodi (where kodi flagrantly violates the ffmpeg API). Thanks, James
#define _GNU_SOURCE #include <dlfcn.h> #include <stdint.h> // Mini version of AVPacket typedef struct AVPacket { void *buf; int64_t pts; int64_t dts; uint8_t *data; int size; } AVPacket; int avcodec_decode_audio4(void* a, void* b, int* got_frame_ptr, const AVPacket* pkt) { // Ignore null packets if (pkt->size == 0) { *got_frame_ptr = 0; return 0; } // Forward to real function int (*orig_decode)(void*, void*, int*, const AVPacket*) = dlsym(RTLD_NEXT, "avcodec_decode_audio4"); return orig_decode(a, b, got_frame_ptr, pkt); }
signature.asc
Description: OpenPGP digital signature