[FFmpeg-devel] [PATCH 4/4] ffprobe: use avio_size() instead of deprecated file_size attribute.
Clément Bœsch
ubitux at gmail.com
Sat Nov 5 15:27:06 CET 2011
On Sat, Nov 05, 2011 at 02:15:56PM +0100, Stefano Sabatini wrote:
> On date Saturday 2011-11-05 13:30:52 +0100, Clément Bœsch encoded:
> > ---
> > ffprobe.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/ffprobe.c b/ffprobe.c
> > index 4ee87ec..0e50bc9 100644
> > --- a/ffprobe.c
> > +++ b/ffprobe.c
> > @@ -757,7 +757,7 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
> > print_str("format_long_name", fmt_ctx->iformat->long_name);
> > print_str("start_time", time_value_string(val_str, sizeof(val_str), fmt_ctx->start_time, &AV_TIME_BASE_Q));
> > print_str("duration", time_value_string(val_str, sizeof(val_str), fmt_ctx->duration, &AV_TIME_BASE_Q));
> > - print_str("size", value_string(val_str, sizeof(val_str), fmt_ctx->file_size, unit_byte_str));
> > + print_str("size", value_string(val_str, sizeof(val_str), avio_size(fmt_ctx->pb), unit_byte_str));
>
> This prints a negative number in case of error (e.g. in case the
> format is not seekable), which should be avoided, you might add a
> check on the return value.
Added the check and pushed.
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111105/801cb619/attachment.asc>
More information about the ffmpeg-devel
mailing list