[FFmpeg-cvslog] segmenter: loose rindex()
Michael Niedermayer
git at videolan.org
Mon Oct 17 16:58:01 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 17 16:51:48 2011 +0200| [0556eee43ff92f9c726494f2af52ee7d7c1e9a07] | committer: Michael Niedermayer
segmenter: loose rindex()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0556eee43ff92f9c726494f2af52ee7d7c1e9a07
---
libavformat/segment.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index e4c919f..80716bc 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -99,8 +99,8 @@ static int seg_write_header(AVFormatContext *s)
if (!seg->path) {
char *t;
seg->path = av_strdup(s->filename);
- t = rindex(seg->path, '.');
- if (t) t = '\0';
+ t = strrchr(seg->path, '.');
+ if (t) *t = '\0';
}
oc = avformat_alloc_context();
More information about the ffmpeg-cvslog
mailing list