hwaccel: Deinitialize hardware acceleration early enough

The application will destroy the underlying hardware handles when
get_format() gets called again. Also this ensures the
deinitialization takes place if the get_format callback returns an
error.

Regression from 1c80c9d7ef809180042257200c7b5f6b81d0b0e2.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merge commit '4ff670d99bebd97429322719089363d83143477d'

* commit '4ff670d99bebd97429322719089363d83143477d':
  hwaccel: Deinitialize hardware acceleration early enough

Merged-by: Michael Niedermayer <michaelni@gmx.at>
doc: clarify -frames options behavior

Replace "frames to record" with "frames to output". The "to record"
makes it seem like an input option, or that it would capture the frames
instead of outputting them.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
rtmpproto: Ignore errors from the getStreamLength method

It is never an error if this method failed. If rt->live was
explicitly set to 0 (known to be a recorded file), print it
as a warning, otherwise print it as a debug message.

Based on a patch by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'a490391157dcf4dc6b65352ec3eea2781dd0a404'

* commit 'a490391157dcf4dc6b65352ec3eea2781dd0a404':
  rtmpproto: Ignore errors from the getStreamLength method

Conflicts:
	libavformat/rtmpproto.c

See: 09711545f5d256bd3ac77004d123dae36c5db8f9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/udp: UDP-Lite (RFC 3828) support added

(This fixes ticket #1501)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_idet: add a repeated field detection

This can be useful for determining telecine.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/time_internal: do not attempt to override *time_r() macros

Fixes build on somewhat odd setups with mingw
Fixes Ticket4075

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
v4l2: support MPEG4 compressed streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vdpau_mpeg4: Do not fail on unknown profile.

This is a regression, previous code did not require
users to set the profile to use VDPAU.
In addition, ASP is a superset of SP, so there is not
even a good reason to require it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
ffmpeg: init sub2video.last_pts.

Get the heartbeat working when the video has negative timestamps.

Fix trac ticket #4062.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegaudio_parser: fix off by 1 error in bitrate calculation

Fixes Ticket3918

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vorbis_parser: use a dedicated AVClass for logging

Currently, the API takes an external AVCodecContext, which is used only
for extradata and logging. This change will allow to it to work without
an AVCodecContext in the following commits.
vorbis_parser: add an AV prefix to VorbisParseContext

This is done in preparation for making it public.
lavc: add a public API for parsing vorbis packets.

It is required by (at least) the ogg demuxer.

Mark the current semi-public apriv API for removal.
lavc,lavf: switch to the new vorbis parse API
lavf: use the format context strict_std_compliance instead of the codec one
riffenc: do not fall back on AVCodecContext.frame_size for MP3

It will not be set unless the codec context is used as the encoding
context, which is discouraged. For MP2, av_get_audio_frame_duration()
will already set the frame size properly. For MP3, set the frame size
explicitly.
lavf: stop using avpriv_flac_parse_streaminfo()

The only parameters needed by the demuxers are the sample rate and sample
count, which can be trivially extracted manually, without resorting to
an avpriv function.
lavc: make avpriv_flac_parse_streaminfo() private on the next bump