[Libav-user] timestamp error
Florin
killerappzz at gmail.com
Mon Jun 25 01:18:31 CEST 2012
Hello Vlad,
Thanks for your reply. I just tried the code you sent me, but now when I run
I get the following error when running the application:
[swscaler @ 0x8e56780] bad dst image pointers
However this brings me closer to the answer. After searching I see that this
error is thrown if the pointers to the destination data planes are not
valid. But shouldn't they have been set by the avpicture_fill call?
I tried a quick'n'dirty fix: just before the sws_scale call, I manually set
the pointers to the planes, like this:
int size = aCtx->width * aCtx->height;
tempFrame->data[0] = buffer;
tempFrame->data[1] = tempFrame->data[0] + size;
tempFrame->data[2] = tempFrame->data[1] + size / 4;
tempFrame->linesize[0] = aCtx->width;
tempFrame->linesize[1] = aCtx->width / 2;
tempFrame->linesize[2] = aCtx->width / 2;
And after doing this, I get again segmentation fault! So, on the good news
side, at least now I found out the cause of the segmentation fault from my
previous attempt, it comes from my wrongly setting these data planes.
So now, question is: how to set the pointers to the destination data planes
?
Best regards,
Florin.
--
View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-timestamp-error-tp4655201p4655266.html
Sent from the libav-users mailing list archive at Nabble.com.
More information about the Libav-user
mailing list