[FFmpeg-cvslog] ass_split: accept files with only \n and no \r.

Nicolas George git at videolan.org
Wed Mar 7 16:58:40 CET 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Wed Feb 29 13:46:32 2012 +0100| [c088b7f389ebeaf1070d63ac9d38ef20bae0c7cb] | committer: Nicolas George

ass_split: accept files with only \n and no \r.

The +1 is there to skip the ','.
With \r\n, the +1 skips the \r but that is ok.
With only \n, the +1 skips it and all hell breaks loose.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c088b7f389ebeaf1070d63ac9d38ef20bae0c7cb
---

 libavcodec/ass_split.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
index 2a3b764..a0b7254 100644
--- a/libavcodec/ass_split.c
+++ b/libavcodec/ass_split.c
@@ -232,7 +232,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
                         break;
                     }
                 (*number)++;
-                buf = skip_space(buf + len + 1);
+                buf = skip_space(buf + len + (buf[len] == ','));
             }
             ctx->field_order[ctx->current_section] = order;
         } else if (section->fields_header) {



More information about the ffmpeg-cvslog mailing list