Hi there,
I'm new to ffmpeg, so I'm not sure if I'm in the right place.
Yet...
here's my problem:
Since we switched to a new ubuntu version recently, our C++ video
input framework based on libavcodec crashes (sometimes) when reading
flash videos.
We switched from this setup:
ii libavcodec-dev 3:0.cvs20070307-5ubuntu7.1+medibuntu1 development
files for libavcodec - Medibuntu
ii libavcodec1d 3:0.cvs20070307-5ubuntu7.1+medibuntu1 ffmpeg
codec library - Medibuntu package
to this one:
ii libavcodec-dev 3:0.svn20080206-12ubuntu3 development files for libavcodec
ii libavcodec51 3:0.svn20080206-12ubuntu3 ffmpeg codec library
our code uses sws_scale (we replaced the deprecated img_convert):
...
static struct SwsContext *img_convert_ctx;
img_convert_ctx = sws_getContext(pCodecCtx->width,
pCodecCtx->height,
pCodecCtx->pix_fmt,
pCodecCtx->width,
pCodecCtx->height,
PIX_FMT_RGB24,
SWS_FAST_BILINEAR,
NULL,NULL,NULL);
if(img_convert_ctx == NULL) {
fprintf(stderr, "Cannot initialize the
conversion context!\n");
exit(1);
}
sws_scale(img_convert_ctx, pFrame->data,
pFrame->linesize, 0,
pCodecCtx->height,
pFrameRGB->data,pFrameRGB->linesize);
...
valgrind reports the following error again and again when reading some
flash videos.
(for others, it works just fine).
==15353== Invalid write of size 1
==15353== at 0x639494F: (within /usr/lib/libswscale.so.0.5.0)
==15353== by 0x638624A: sws_scale (in /usr/lib/libswscale.so.0.5.0)
==15353== by 0x407AC7: iupr::VidIn::readFrame(iupr::narray<unsigned
char>&, iupr::narray<unsigned char>&, iupr::narray<unsigned char>&)
(vidio.cc:254)
==15353== by 0x4058D1: main (fastkeyframes.cc:152)
==15353== Address 0xb31fbf8 is 0 bytes after a block of size 229,440 alloc'd
==15353== at 0x4C2582C: operator new[](unsigned long)
(vg_replace_malloc.c:274)
==15353== by 0x406C7B: iupr::VidIn::init() (vidio.cc:116)
==15353== by 0x406CD1: iupr::VidIn::VidIn(char*) (vidio.cc:52)
==15353== by 0x405870: main (fastkeyframes.cc:145)
...
I would be happy to provide any other information that's needed.
Also, am I in the right place here?
Thanks a lot for your help in advance,
cheers,
adrian
--
--
Dipl.-Inf. Adrian Ulges
IUPR - Image Understanding and Pattern Recognition
Tel: +49 631 20575 419
Mail: [email protected]
-------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany
Geschaeftsfuehrung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
-------------------------------------------------------------
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user