Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int init_muxer(AVFormatContext *s, AVDictionary **options)
- {
- ....
- if (st->sample_aspect_ratio.num != 0 &&
- st->sample_aspect_ratio.den != 0 &&
- codec->sample_aspect_ratio.den != 0 &&
- codec->sample_aspect_ratio.den != 0) {
- av_log(s, AV_LOG_ERROR,
- "Aspect ratio mismatch between muxer "
- "(%d/%d) and encoder layer (%d/%d)\n",
- st->sample_aspect_ratio.num,
- st->sample_aspect_ratio.den,
- codec->sample_aspect_ratio.num,
- codec->sample_aspect_ratio.den);
- ret = AVERROR(EINVAL);
- goto fail;
- }
- ....
- }
- This suspicious code was found in FFMpeg project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions 'codec->sample_aspect_ratio.den != 0' to the left and to the right of the '&&' operator. mux.c 277
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment