avformat/utils: limit rfps to values larger than fps

This avoids some nonsense values being produced by totally corrupted input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpegts: stop analyzing when pmt for all programs have been found

This disables NOHEADER after finding PMT for all programs to
avoid find_stream_info always exhausting probe size for mpegts.

This is very important for live streams since read speed
will be limited. rtsp, udp and any protocol streaming a live
mpegts will have dramatically faster startup time.

Note, lack of codec parameters for streams can still cause
the full probe size to be exhausted.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/id3v2: factor free code to the end of read_chapter()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/id3v2: Check avio_read() return value in read_chapter()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>