srtpproto: fix option flag type

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpenc: Set the timestamp properly when sending mpegts data, too

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpenc: Set the AVFMT_TS_NONSTRICT flag

In particular, when packetizing mpegts into rtp, the input packet
timestamp may come from more than one stream, which could cause
multiple packets be written with the same timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
h261enc: Disallow sliced encoding

This avoids trying to do sliced encoding, even if a slice/packet
size is requested (via the -ps option or the rtp_payload_size
field), since the encoder currently doesn't support it (or at least
our decoder can't decode it, even if the h261_encode_gob_header
function is hooked up to be called from the slicing part in
mpegvideo_enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
avcodec/adpcm: Check idelta

Fixes integer overflow
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_spp: Fix pointer type warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_spp: add gray8 support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_spp: add gbrp support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/indeo3: ensure offsets are non negative

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'f2c614e8c4a935b52bbf86819128d9e797230c20'

* commit 'f2c614e8c4a935b52bbf86819128d9e797230c20':
  srtpproto: fix option flag type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '01f251c44d83eedc819625d2caac9ff9697a085d'

* commit '01f251c44d83eedc819625d2caac9ff9697a085d':
  rtpenc: Set the timestamp properly when sending mpegts data, too

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '42181740a3972e17d0097d28fabc9a1a60322d47'

* commit '42181740a3972e17d0097d28fabc9a1a60322d47':
  rtpenc: Set the AVFMT_TS_NONSTRICT flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'

* commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8':
  rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '91bfac759dfd536e439ad3e35964705012c6a5a7'

* commit '91bfac759dfd536e439ad3e35964705012c6a5a7':
  h261enc: Disallow sliced encoding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/lut: reduce dereference in the inner loop

For rgb, with a 1080p source, 69 to 74fps on core i5(2 core, 1.8GHz),
and 136 to 160 fps on an core i7(4770R, 3.2Ghz)
Changed the yuv code for consistency, even though the performance
increase is not as obvious as rgb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h261dec: Fix context initialization sequence

ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
rtpenc: Avoid brittle switch fallthroughs

Instead explicitly jump to the default case in the cases where
it is wanted, and avoid fallthrough between different codecs,
which could easily introduce bugs if people editing the code
aren't careful.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtp: Initial H.261 support

The packetizer only supports splitting at GOB headers - if
such aren't available frequently enough, it splits at any
random byte offset (not at a macroblock boundary either, which
would be allowed by the spec) and sends a payload header pretend
that it starts with a GOB header.

As long as a receiver doesn't try to handle such cases cleverly
but just drops broken frames, this shouldn't matter too much
in practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat: Add a muxer wrapping mpegts encoding into RTP

Since this structurally is quite different from normal RTP
(multiple streams are muxed into one single mpegts stream,
which is packetized into one single RTP session), it is kept
as a separate muxer.

Since this structurally also behaves differently than normal
RTP, all of the other muxers that do chained RTP muxing
(rtsp, sap, mp4) would need to be updated similarly to handle
this - in particular, creating one single rtp_mpegts muxer
for the whole presentation instead of one rtp muxer per stream.

Signed-off-by: Martin Storsjö <martin@martin.st>