This does change the logic: previously we returned a failure if any
fragment failed, after your change we only return failure if the last
fragment fails.

On 15 October 2014 12:01, Martin Storsjö <[email protected]> wrote:
> ---
> As far as I can see, the extra variable wasn't ever really
> necessary. Or am I missing something, Mika?
> ---
>  tools/ismindex.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/tools/ismindex.c b/tools/ismindex.c
> index 53be5d6..496b729 100644
> --- a/tools/ismindex.c
> +++ b/tools/ismindex.c
> @@ -177,7 +177,7 @@ static int write_fragments(struct Tracks *tracks, int 
> start_index,
>                             int split, int ismf, const char* output_prefix)
>  {
>      char dirname[2048], filename[2048], idxname[2048];
> -    int i, j, ret = 0, fragment_ret;
> +    int i, j, ret = 0;
>      FILE* out = NULL;
>
>      if (ismf) {
> @@ -207,15 +207,14 @@ static int write_fragments(struct Tracks *tracks, int 
> start_index,
>              if (ismf)
>                  fprintf(out, "%s %"PRId64, filename, avio_tell(in));
>              if (split)
> -                fragment_ret = write_fragment(filename, in);
> +                ret = write_fragment(filename, in);
>              else
> -                fragment_ret = skip_fragment(in);
> +                ret = skip_fragment(in);
>              if (ismf)
>                  fprintf(out, " %"PRId64"\n", avio_tell(in));
> -            if (fragment_ret != 0) {
> +            if (ret != 0) {
>                  fprintf(stderr, "failed fragment %d in track %d (%s)\n", j,
>                          track->track_id, track->name);
> -                ret = fragment_ret;
>              }
>          }
>      }
> --
> 1.9.3 (Apple Git-50)
>
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to