Gotcha!
And the oscar goes to...
Well, the function allocates a buffer that is too small for a full 5.1
AC-3 audio stream (which is what the stream includes) and then calls
avcodec_decode_audio from ffmpeg - which completely ignores the buffer
size argument that the caller provides and writes out a full frame. Bad
luck, eh?
The patch increases the buffer size to avoid the overflow. In the long
run, it would of course be better to get rid of that broken ffmpeg stuff.
Happy dvbcutting,
--
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little
Index: dvbcut/src/mpgfile.cpp
===================================================================
RCS file: /var/cvs/sys/qt3/dvbcut/src/mpgfile.cpp,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 mpgfile.cpp
--- dvbcut/src/mpgfile.cpp 14 Dec 2005 21:32:55 -0000 1.1.1.4
+++ dvbcut/src/mpgfile.cpp 22 Jun 2006 17:03:39 -0000
@@ -232,8 +232,8 @@
if (avcodec_open(S->avcc, S->dec))
return;
- int16_t samples[4096];
- int frame_size=4096;
+ int16_t samples[6*1536]; // must be enough for 6 AC-3 channels --mr
+ int frame_size=sizeof(samples);
avcodec_decode_audio(S->avcc,samples,&frame_size,(uint8_t*)
sd->getdata(),sd->inbytes());
avcodec_close(S->avcc);
}
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user