Luca Abeni wrote:
[...]
Sorry, the only thing I can suggest is a bisection: work with svn, starting
from a working version, then find a non-working version, and use a
dichotomic
search to find the first non-working version (so, you can highlight the
commit
which broke this functionality).
Once the particular commit that created the problem is known, it will be
possible to understand where is the bug (maybe such a commit just exposed
a previously existing bug).
Ok, thanks to some snow and to the idiocy of the italian transportation system,
I had plenty of spare time in this weekend... :(
The good side of this is that I had time to bisect the regression.
Short version of the story: the regression was introduced by r19302, but
such a commit is correct and just made a different bug (in rtpdec.c)
visible... The attached patch fixes it for me.
The long story: rtpdec.c has been broken since forever when receiving MP3
audio (well, technically speaking MP3 over RTP was not supported by
rtpdec.c ;-).
Basically, it did not remove the payload header from the RTP payload before
passing it to the MP3 parser. But the audio mpeg decoder in libavcodec
was pretty forgiving, silently discarding the payload header (so, the
decoder decoded broken streams without complaining).
r19302 changed this behaviour, so the decoder is now generating errors
when broken streams are provided (and this is the correct behaviour, IMHO).
The attached patch fixes rtpdec.c to remove the payload header from MP3
streams, so that the audio decoder can correctly decode them.
This fixes the problem for me.
If noone is against it, I'll commit this patch in few days.
Luca
Index: libavformat/rtpdec.c
===================================================================
--- libavformat/rtpdec.c (revision 20906)
+++ libavformat/rtpdec.c (working copy)
@@ -485,6 +485,7 @@
} else {
// at this point, the RTP header has been stripped; This is ASSUMING that there is only 1 CSRC, which in't wise.
switch(st->codec->codec_id) {
+ case CODEC_ID_MP3:
case CODEC_ID_MP2:
/* better than nothing: skip mpeg audio RTP header */
if (len <= 4)
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user