[FFmpeg-devel] ffplay and the return values
Bernd Krüger-Knauber
bkk at infratec-ag.de
Sun Apr 8 17:23:51 CEST 2012
Hi,
I developed a small tool for playing sat-receiver recordings on a PC.
I use a static linked version of ffplay which fits nearly all my needs.
One problem I discovered:
If a movie is splitted into more than one file an I play them one after
each other,
I can not detect if the user has canceled the film or not.
So I always start the new piece of film, even if the user has canceled
the session.
That was the reason why I modified ffplay.c
If you hink the modifications are useful, feel free to implement them in
the software.
Attached is the diff to the latest git snapshot:
Best regards
-------------- next part --------------
87,101d86
< enum ExitValues {
< NormalExit,
< UserExit,
< SDLVideoModeErrorExit,
< ImageToBigErrorExit,
< LockMgrErorExit,
< VideoStateErrorExit,
< ConversionContextInitErrorExit,
< OptionArgumentErrorExit,
< NoInputfileErrorExit,
< SDLInitErrorExit,
< InputfileErrorExit,
< SigTermHandlerExit
< };
<
926c911
< static void do_exit(VideoState *is, int ExitValue)
---
> static void do_exit(VideoState *is)
941c926
< exit(ExitValue);
---
> exit(0);
946c931
< exit(SigTermHandlerExit);
---
> exit(123);
982c967
< do_exit(is, SDLVideoModeErrorExit);
---
> do_exit(is);
1345c1330
< do_exit(is, ImageToBigErrorExit);
---
> do_exit(is);
1463c1448
< exit(ConversionContextInitErrorExit);
---
> exit(1);
2844c2829
< do_exit(cur_stream, UserExit);
---
> do_exit(cur_stream);
2850c2835
< do_exit(cur_stream, UserExit);
---
> do_exit(cur_stream);
2922c2907
< do_exit(cur_stream, UserExit);
---
> do_exit(cur_stream);
2965,2966d2949
< do_exit(cur_stream, UserExit);
< break;
2968c2951
< do_exit(cur_stream, NormalExit);
---
> do_exit(cur_stream);
3028c3011
< exit(OptionArgumentErrorExit);
---
> exit(1);
3059c3042
< exit_program(InputfileErrorExit);
---
> exit_program(1);
3214c3197
< exit(NoInputfileErrorExit);
---
> exit(1);
3229c3212
< exit(SDLInitErrorExit);
---
> exit(1);
3246c3229
< do_exit(NULL, LockMgrErorExit);
---
> do_exit(NULL);
3255c3238
< do_exit(NULL, VideoStateErrorExit);
---
> do_exit(NULL);
More information about the ffmpeg-devel
mailing list