Ticket #276 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

FFPlay when compiled for arm and executed on BeagleBoard Xm + Angstrom gives segmentation fault

Reported by: luckynarang123 Owned by: michael
Priority: normal Component: FFplay
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi Everybody,

We have compiled angstrom on beagleboard xm rev B,and build the ffmpeg for it,the component ffplay doesn't get generated,please let us know the configure command for generating the ffplay for beagle board xm + angstrom

Change History

comment:1 Changed 2 years ago by cehoyos

  • Priority changed from important to normal
  • Status changed from new to open
  • Component changed from FFplay to build system

For build problems, please attach config.log.

comment:2 follow-up: ↓ 13 Changed 2 years ago by luckynarang123

This is the configure command we have used....

./configure --arch=arm --target-os=linux --enable-cross-compile --cross-prefix=arm-none-linux-gnueabi- --cc=arm-none-linux-gnueabi-gcc --prefix=/home/Lucky/Lucky_Data/ACP_project/SDL-1.2.14 --enable-gpl --enable-x11grab --enable-avfilter --enable-pthreads --enable-postproc --enable-avfilter-lavf --enable-filter=drawtext --enable-static --enable-runtime-cpudetect --enable-hwaccel=h264_vaapi --enable-swscale --enable-debug --disable-shared --extra-cflags="$(pkg-config sdl --cflags)" --extra-ldflags="$(pkg-config sdl --libs)"

We have found that ffplay has sdl dependancies....we have resolved those and any how generate the ffplay executable using codesourcery,but when executed on board it gives segfault,the reason we found is that SDL_SetVideoMode fails,it returns NULL screen,what could be reason for this call getting failed,please help ?

comment:3 follow-up: ↓ 4 Changed 2 years ago by cehoyos

  • Type changed from task to defect
  • Component changed from build system to FFplay

Does SDL_SetVideoMode() segfault, or does it return NULL?

comment:4 in reply to: ↑ 3 Changed 2 years ago by luckynarang123

Replying to cehoyos:

Does SDL_SetVideoMode() segfault, or does it return NULL?

It returns NULL,but whenever this NULL screen is referred it gives segmentation fault.

The usage is as follows:

w=640
h=480
flags=SDL_HWSURFACE | SDL_SYNCBLIT | SDL_HWACCEL
SDL_SetVideoMode(w,h,0,flags);

comment:5 Changed 2 years ago by luckynarang123

It returns NULL,whenever this NULL screen is referred it gives segmentation fault.

The usage is as follows:

w=640
h=480
flags=SDL_HWSURFACE | SDL_SYNCBLIT | SDL_HWACCEL
SDL_SetVideoMode(w,h,0,flags);

comment:6 Changed 2 years ago by cehoyos

When is this NULL screen ever referred to in ffplay?

comment:7 Changed 2 years ago by luckynarang123

It is not referred in ffplay,but when it is NULL,then on comparison to NULL,the event loop thread returns -1,and eventually the decode_thread gives segmentation fault.

comment:8 Changed 2 years ago by cehoyos

Did you already try to use 24 (or another value) as the third operand to SDL_SetVideoMode()?

comment:9 Changed 2 years ago by luckynarang123

yes i have tried 0 and 24 still it gives segmentation fault....Is there any issue while configuring...or do we have to provide some additional option to ffplay executable....

Last edited 2 years ago by luckynarang123 (previous) (diff)

comment:10 Changed 2 years ago by cehoyos

  • Status changed from open to closed
  • Resolution set to fixed

I fixed the crash (thank you for the report and the analysis), I believe you should work with the program posted here -  http://markmail.org/message/5mcalro2qcbouph5 - and try to get it to work, I don't think you will be able to use ffplay before it works.

comment:11 Changed 23 months ago by luckynarang123

Finally it works the only reason was i have to export DISPLAY=:0.0,after that it works fine.

comment:12 Changed 23 months ago by cehoyos

Thank you for explaining this, I sent a patch giving users a hint to the developer mailing list!

comment:13 in reply to: ↑ 2 Changed 20 months ago by trandung0101

Replying to luckynarang123:

We have found that ffplay has sdl dependancies....we have resolved those and any how generate the ffplay executable using codesourcery...

I am trying to do the same thing but I can't build ffplay.
After configuring as you said, I checked config.log and found nothing strange.
I checked make.log and I found "CC ffmpeg" but I couldn't found "CC ffplay".
I guess ffplay isn't compiled.

Do you know why? Could you tell me how you build SDL and ffplay?

Note: See TracTickets for help on using tickets.