[Libav-user] Errors when creating a C++ object (with a C API) in FFmpeg filter

2016-09-13 Thread R n
Dear all,


First, thanks for this mail list which helped me solve the compilation problem.


I wrote a C++ class using openCV as well as a C wrapper/API. I am now using it 
in FFmpeg filter. In the filter, I create a pointer to an object which is 
generated by calling the C API (The API actually returns "new myCPPclass()"). 
It can compile but the execution of the program "stop" around the place where 
the pointer is created. "Stop" here means that there is no printed info anymore 
(I print out the execution steps) but the response of the computer to my typing 
is wired. Looks like the memory has some problems.


In FFmpeg, people use av_malloc... , but it is not encouraged to first malloc 
the memory to the C++ object using malloc and then cast its type to a C++ class.


Did I miss anything? Thanks a lot.


My code looks like the following:

1. C++ class:

class myCPPclass {

myCPPclass(abc);

memberVar;

memberMethod();

}


2. C API:

typedef myCPPclass myCPPclass;

extern "C" myCPPclass* myCPPclass_new(abc) {

  return new myCPPclass(abc);

}


3. FFmpeg filter (in C):

myCPPclass* ptr = myCPPclass_new(abc);
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


[Libav-user] can't decode swf correctly while MPC-HOME could

2016-09-13 Thread YIRAN LI
Hi guys,

My MPC-Home could play
https://www.dropbox.com/s/6rlz2mx3xwhf5q5/pano5.swf?dl=0 corectly (same as
play in Adobe Flash player)

But latest ffplay can't play it correctly.

Could anyone help to check why.

Thanks
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] "Segmentation fault" When encoding H264 video frame

2016-09-13 Thread M N
13.09.2016, 00:02, "Leandro Raffo" :
>
> Did you tried Valgrind?
> ___
> Libav-user mailing list
> Libav-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

In GDB, I get:

Program received signal SIGSEGV, Segmentation fault.
0x7705f210 in avcodec_encode_video2 () from /usr/lib64/libavcodec.so.56

I can't use Valgrind at the moment due to its lack of compatibility in my linux 
distro. 
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Compiling ffmpeg with pthread support mscv toolchain

2016-09-13 Thread Carl Eugen Hoyos
2016-09-12 20:04 GMT+02:00 Leonardo Nahra :

> check_func pthread_create -pthread
> check_ld cc -pthread
> check_cc -pthread
> BEGIN ./ffconf.SDAJxYXo.c
> 1 extern int pthread_create();
> 2 int main(void){ pthread_create(); }
> END ./ffconf.SDAJxYXo.c
> c99wrap cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -Dstrtod=avpriv_strtod -Dsnprintf=avpriv_snprintf
> -D_snprintf=avpriv_snprintf -Dvsnprintf=avpriv_vsnprintf
> -D_WIN32_WINNT=0x0502 -nologo -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS
> -D_CRT_NONSTDC_NO_WARNINGS -I/home/%username%/ffmpeg/include -pthread -c
> -Fo./ffconf.UUlikmky.o ./ffconf.SDAJxYXo.c
> cl : Command line warning D9002 : ignoring unknown option '-pthread'
> ffconf.UUlikmky.o_converted.c
> ./compat/windows/mslink -L/home/%username%/ffmpeg/lib -nologo
> -LARGEADDRESSAWARE -pthread -out:./ffconf.omVGyQVw.exe ./ffconf.UUlikmky.o
> psapi.lib advapi32.lib shell32.lib pthreadVC2.lib
> LINK : warning LNK4044: unrecognized option
> '/LC:/c99/home/%username%/ffmpeg/lib'; ignored
> LINK : warning LNK4044: unrecognized option '/pthread'; ignored
>
> this error is repeated with several other functions that may be related to
> pthread.

The log above does not indicate an error afaict.

Carl Eugen
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


[Libav-user] Demuxer not giving proper data to decoder ?

2016-09-13 Thread ssshukla26
I have added support for one of our custom decoder (with id
*AV_CODEC_ID_H264*) in ffmpeg source, and its working fine with *h264* and
*mp4* files.

When playing mp4 file am seeing macroblocks artefact. So debugging further,
I dump the in-coming packets from demuxer before decoding and found that the
packets itself contains macro blocks artefact. 

So am very very confuse, why demuxer is outputting data with macro blocks
artefact ! 

Please help. 



--
View this message in context: 
http://libav-users.943685.n4.nabble.com/Libav-user-Demuxer-not-giving-proper-data-to-decoder-tp4662628.html
Sent from the libav-users mailing list archive at Nabble.com.
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user