ffprobe: fix uninitialized variable warning

Fix warning:
ffprobe.c:1684:21: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized] end = start + interval->end;

The warning is a false positive, since the variable is accessed only if
has_start is set, and in that case start has been already set.
pull/36/head
Stefano Sabatini 11 years ago
parent c74fa39b93
commit 7bac6e5cf8
  1. 2
      ffprobe.c

@ -1636,7 +1636,7 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx,
AVPacket pkt, pkt1;
AVFrame frame;
int ret = 0, i = 0, frame_count = 0;
int64_t start, end = interval->end;
int64_t start = -INT64_MAX, end = interval->end;
int has_start = 0, has_end = interval->has_end && !interval->end_is_offset;
av_init_packet(&pkt);

Loading…
Cancel
Save