[FFmpeg-cvslog] r22939 - trunk/libavformat/aviobuf.c
stefano
subversion
Wed Apr 21 23:19:26 CEST 2010
Author: stefano
Date: Wed Apr 21 23:19:25 2010
New Revision: 22939
Log:
Do not initialize res in url_fseek(), in the case !s->seek directly
return AVERROR(EPIPE) rather than the pre-defined value of res.
Slightly improve readability.
Modified:
trunk/libavformat/aviobuf.c
Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c Wed Apr 21 20:01:34 2010 (r22938)
+++ trunk/libavformat/aviobuf.c Wed Apr 21 23:19:25 2010 (r22939)
@@ -160,7 +160,7 @@ int64_t url_fseek(ByteIOContext *s, int6
return AVERROR_EOF;
s->buf_ptr = s->buf_end + offset - s->pos;
} else {
- int64_t res = AVERROR(EPIPE);
+ int64_t res;
#if CONFIG_MUXERS || CONFIG_NETWORK
if (s->write_flag) {
@@ -168,7 +168,9 @@ int64_t url_fseek(ByteIOContext *s, int6
s->must_flush = 1;
}
#endif /* CONFIG_MUXERS || CONFIG_NETWORK */
- if (!s->seek || (res = s->seek(s->opaque, offset, SEEK_SET)) < 0)
+ if (!s->seek)
+ return AVERROR(EPIPE);
+ if ((res = s->seek(s->opaque, offset, SEEK_SET)) < 0)
return res;
if (!s->write_flag)
s->buf_end = s->buffer;
More information about the ffmpeg-cvslog
mailing list