[FFmpeg-devel] [PATCH] astenc: Add an option to set the loop flag

James Almer jamrial at gmail.com
Sat Dec 22 19:53:21 CET 2012

On 22/12/12 2:46 PM, Michael Niedermayer wrote:
>>  #define OFFSET(obj) offsetof(ASTMuxContext, obj)
>>  static const AVOption options[] = {
>> +  { "astflags",  "AST Muxer flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "astflags" },
>> +  { "loop",      "Enable looping",  0,             AV_OPT_TYPE_CONST, {.i64 = 1}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "astflags" },
> why astflags ?
> isnt a loop field alone simpler ?

I called the option astflags since every other muxer i checked used a similar name (Look for example movenc.c).
In this case the only flag available would be "loop" instead of the six or so the mov muxer has.

Adding a "loop" option alone would require the user to write "-loop 1" or something like that in order to enable it.
I don't like it as much, but if that's the preferred way then I'm ok with it.

And if not the above, what would you recommend for this instead?


More information about the ffmpeg-devel mailing list