Converting to double before the multiplication rather than after
avoids an integer overflow in some cases.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Add flags field to Writer, and define the
WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS flag which forces the display of
optional fields, for example non-available or invalid fields.
Also set the flag in the default writer.
This change is required as for some writers it is preferable to show all
fields (for example for avoiding a variable number of fields in CSV
output), while for other formats (e.g. JSON, XML) it is better to leave
invalid/unavailable fields unspecified and thus simplify the parsing
stage on the deserializer side.
The Apple HTTP Live Streaming demuxer's implementation of seeking searches for
the MPEG TS segment which contains the requested timestamp. In its current
implementation it assumes that the first segment will start from 0.
But, MPEG TS streams do not necessarily start with timestamp (near) 0, causing
seeking to fail for those streams.
This also occurs when using live streaming of HTTP Live Streams. In this case
sliding playlists may be used, which means that in that case only the last x
encoded segments are stored, the earlier segments get deleted from disk and
removed from the playlist. Because of this, when starting playback of a stream
in the middle of such a broadcast, the initial segment fetched after parsing
the m3u8 playlist will not start from timestamp (near) 0, causing (the
admittedly limited live) seeking to fail.
This patch changes this demuxers seeking implementation to use the initial DTS
as an offset for searching the segments containing the requested timestamp.
* qatar/master:
binkvideo: simplify and remove invalid shifts
pulse: compute frame_duration once and fix it
lavf: simplify format_child_class_next()
hwaccel: OS X Video Decoder Acceleration (VDA) support.
doc: add support for an optional navigation bar in texi2html pages
Conflicts:
configure
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/vda.c
libavcodec/vda.h
libavcodec/vda_h264.c
libavcodec/vda_internal.h
libavcodec/version.h
libavformat/options.c
libavutil/avutil.h
libavutil/pixfmt.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The frame duration was calculated without taking in account the
bytes per sample.
Thanks to Lorenzo Pistone <blaffablaffa@gmail.com> for pointing
the issue and providing an initial fix.