[FFmpeg-devel] [PATCH] Add loop option to ffplay

Michael Niedermayer michaelni
Sun Mar 21 16:51:10 CET 2010


On Sat, Mar 20, 2010 at 01:58:08PM +0100, Robert Kr?ger wrote:
> 
> On 20.03.2010, at 12:54, Stefano Sabatini wrote:
> 
> > On date Saturday 2010-03-20 12:08:32 +0100, Stefano Sabatini encoded:
> >> On date Saturday 2010-03-20 08:53:16 +0100, Robert Kr?ger encoded:
> >>> 
> >>> On 19.03.2010, at 21:07, Michael Niedermayer wrote:
> > [...]
> >>>> make loop take an argument that specifies how oftten too loop and
> >>>> afterwards exist if autoexit is there 
> >>>> 
> >>> 
> >>> and not allow the user to specify to loop indefinitely other than
> >>> with a high number?
> >> 
> >> loop will take a number as argument, when count == loop -> exit if
> >> autoexit, a negative value may mean "loop forever", in the latter case
> >> autoexit would be just ignored.
> > 
> > From the mplayer man page:
> > -loop <number>
> >              Loops movie playback <number> times.  0 means forever.
> > 
> 
> Updated patch attached.
> 
> Regards,
> 
> Robert
> 

>  doc/ffplay-doc.texi |    3 ++-
>  ffplay.c            |   17 ++++++++++++++---
>  2 files changed, 16 insertions(+), 4 deletions(-)
> 6bd03cc959fbdfc6d66ab1b1f12854ef3e5b8f61  ffplay-loop-option.patch
> Index: ffplay.c
> ===================================================================
> --- ffplay.c	(revision 22598)
> +++ ffplay.c	(working copy)
> @@ -260,6 +260,8 @@
>  static int error_concealment = 3;
>  static int decoder_reorder_pts= -1;
>  static int autoexit;
> +static int loop= -1;
> +static int loop_count= 0;
>  static int framedrop=1;

why 2 variables?


>  
>  static int rdftspeed=20;
> @@ -2300,6 +2302,7 @@
>      AVPacket pkt1, *pkt = &pkt1;
>      AVFormatParameters params, *ap = ¶ms;
>      int eof=0;
> +    int64_t start= (int64_t)0;

unneeded cast


[...]
>  @end table
> -
>  @section Advanced options
>  @table @option
>  @item -pix_fmt @var{format}

cosmetics

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100321/b5f34916/attachment.pgp>



More information about the ffmpeg-devel mailing list