1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-04 07:21:31 +02:00
Commit Graph

151 Commits

Author SHA1 Message Date
James Almer
3749eede66 avformat: remove deprecated AVStream.codec
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:47:24 -03:00
James Almer
10c01c3779 avformat/sdp: add missing FF_API_LAVF_AVCTX check
Signed-off-by: James Almer <jamrial@gmail.com>
2020-10-01 22:45:34 -03:00
Andreas Rheinhardt
5d91b7718e avformat/sdp: Fix potential write beyond end of buffer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-10 20:36:31 +02:00
Carl Eugen Hoyos
a171cafb35 lavf/sdp: Change pointer to configuration from char* to uint8_t*.
This is also what av_base64_encode() expects.
Fixes the following warnings with clang:
libavformat/sdp.c:394:40: warning: implicit conversion from 'int' to 'char' changes value from 254 to -2
libavformat/sdp.c:395:40: warning: implicit conversion from 'int' to 'char' changes value from 205 to -51
libavformat/sdp.c:396:40: warning: implicit conversion from 'int' to 'char' changes value from 186 to -70
2019-03-20 17:19:14 +01:00
Marton Balint
18ac642359 avformat: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Carl Eugen Hoyos
75bd01090f lavf/rtpenc: Add support for 24 bit pcm encoding as defined by RFC 3190.
Fixes ticket #6770.
2017-10-29 15:30:02 +01:00
Carl Eugen Hoyos
2386cfc1ae lavf/rtpenc: Add support for little-endian G.726. 2017-10-07 20:47:10 +02:00
Carl Eugen Hoyos
50462e3e5e lavf/sdp: Fix MIME-type for big-endian G.726.
RFC 3551 defines "G726" for little-endian ("right-justified") G.726
and announces "AAL2-G726" for big-endian ("left-justified") G.726.
2017-10-07 20:41:38 +02:00
Carl Eugen Hoyos
724cf83f10 Remove some unneeded casts of bit_rate. 2017-09-22 01:33:22 +02:00
James Almer
d688f39dc4 cosmetics: fix some misspelled words
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-17 13:10:27 -03:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Thomas Volkert
668fb1cb6a rtpenc: packetizer for VP9 RTP payload format (draft v2) 2016-06-13 18:09:34 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Thomas Volkert
f591b7b526 rtpenc: packetizer for VC-2 HQ RTP payload format (draft v1) 2016-05-03 19:07:37 +02:00
Derek Buitenhuis
6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Mark Harris
c3bb6166dd sdp: fix opus sprop-stereo fmtp syntax
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-01 20:52:33 +01:00
Mark Harris
4d13bcceb9 sdp: fix opus sprop-stereo fmtp syntax
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-01 08:56:36 +02:00
Anton Khirnov
9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.

In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.

There are multiple important problems with this approach:
    - the fields in AVCodecContext are in general one of
        * stream parameters
        * codec options
        * codec state
      However, it's not clear which ones are which. It is consequently
      unclear which fields are a demuxer allowed to set or a muxer allowed to
      read. This leads to erratic behaviour depending on whether decoding or
      encoding is being performed or not (and whether it uses the AVStream
      embedded codec context).
    - various synchronization issues arising from the fact that the same
      context is used by several different APIs (muxers/demuxers,
      parsers, bitstream filters and encoders/decoders) simultaneously, with
      there being no clear rules for who can modify what and the different
      processes being typically delayed with respect to each other.
    - avformat_find_stream_info() making it necessary to support opening
      and closing a single codec context multiple times, thus
      complicating the semantics of freeing various allocated objects in the
      codec context.

Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Michael Niedermayer
7404f3bdb9 lavc: Switch bitrate to 64bit unless compatibility with avconv was requested. 2015-09-15 18:02:43 +02:00
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
  lavc: AV-prefix all codec flags

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/ac3enc_float.c
	libavcodec/atrac1.c
	libavcodec/atrac3.c
	libavcodec/atrac3plusdec.c
	libavcodec/dcadec.c
	libavcodec/ffv1enc.c
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb.c
	libavcodec/imc.c
	libavcodec/libmp3lame.c
	libavcodec/libtheoraenc.c
	libavcodec/libtwolame.c
	libavcodec/libvpxenc.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegaudiodec_template.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/nellymoserdec.c
	libavcodec/nellymoserenc.c
	libavcodec/nvenc.c
	libavcodec/on2avc.c
	libavcodec/options_table.h
	libavcodec/opus_celt.c
	libavcodec/pngenc.c
	libavcodec/ra288.c
	libavcodec/ratecontrol.c
	libavcodec/twinvq.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c
	libavcodec/vorbisdec.c
	libavcodec/vp3.c
	libavcodec/wma.c
	libavcodec/wmaprodec.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02:00
Michael Niedermayer
5162af67f4 Merge commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f'
* commit 'a505c0d7373336a4cc5aa2022111c46bdd388b1f':
  rtp: Initial H.261 support

Conflicts:
	Changelog
	libavformat/rtpdec_h261.c
	libavformat/rtpenc_h261.c
	libavformat/sdp.c
	libavformat/version.h

See: 50a4d5cfc6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 02:34:17 +01:00
Thomas Volkert
a505c0d737 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>
2014-12-18 23:11:37 +02:00
Michael Niedermayer
ad2deb02e5 avcodec/xiph: mark returned header pointers const from avpriv_split_xiph_headers()
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 14:30:45 +01:00
Michael Niedermayer
a9ed4f1d15 Merge commit 'e5cfc8fdad901c9487fe896421972852f38bcf5'
* commit 'e5cfc8fdad901c9487fe896421972852f38bcf5':
  sdp: Provide out of bound parameter sets for HEVC if extradata is set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 19:16:55 +02:00
Martin Storsjö
e5cfc8fdad sdp: Provide out of bound parameter sets for HEVC if extradata is set
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-15 12:12:54 +03:00
Michael Niedermayer
4db0e8fd33 Merge commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7'
* commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7':
  sdp: Simplify parsing/conversion of H264 extradata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-07 02:40:02 +02:00
Martin Storsjö
b762494438 sdp: Simplify parsing/conversion of H264 extradata
By using ff_avc_write_annexb_extradata instead of the h264_mp4toannexb
BSF, the code for doing the conversion itself is kept much shorter,
there's less state to restore at the end, we don't risk leaving the
AVCodecContext in an inconsistent state if returning early due to
errors, etc.

Also add a missing free if the base64 encoding fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-06 23:29:58 +03:00
Thomas Volkert
1c4c78ee40 sdp: add support for H.261
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 00:53:13 +02:00
Michael Niedermayer
77ab7407c2 Merge commit 'a05f5052fef3b3743fab7846da12861d8a8098ec'
* commit 'a05f5052fef3b3743fab7846da12861d8a8098ec':
  sdp: Make opus declaration conform to the spec

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-29 20:26:15 +02:00
Timothy B. Terriberry
a05f5052fe sdp: Make opus declaration conform to the spec
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-29 13:48:42 +03:00
Michael Niedermayer
d8ddac363e Merge commit 'ddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc'
* commit 'ddf5fb71ee9c8b2d9a23c0f661a84896cd7050fc':
  rtpenc: HEVC/H.265 support

Conflicts:
	Changelog
	libavformat/rtpenc.c
	libavformat/rtpenc_hevc.c
	libavformat/version.h

See: 6821a5a4ad
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-25 00:17:36 +02:00
Thomas Volkert
ddf5fb71ee rtpenc: HEVC/H.265 support
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-24 23:33:26 +03:00
Michael Niedermayer
fb33bff990 Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39':
  cosmetics: Write NULL pointer equality checks more compactly

Conflicts:
	cmdutils.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/dvbsub.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/dxa.c
	libavcodec/libxvid_rc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/zmbv.c
	libavdevice/v4l2.c
	libavformat/matroskadec.c
	libavformat/movenc.c
	libavformat/sdp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:00:50 +02:00
Gabriel Dume
f929ab0569 cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
Carl Eugen Hoyos
ced0d6c14d Use correct msvc type specifiers for ptrdiff_t and size_t.
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472.

Reviewed-by: Ronald Bultje
2014-04-24 18:01:30 +02:00
Michael Niedermayer
70937d9708 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  sdp: Check that fmt->oformat is non-null before accessing it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 02:38:57 +01:00
Martin Storsjö
82b9799bb2 sdp: Check that fmt->oformat is non-null before accessing it
This avoids crashes when avserver tries to create an SDP, since
d77f4af.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-05 01:33:46 +02:00
Michael Niedermayer
09c13ff7bd Merge commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4'
* commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4':
  sdp: Check theora colorspace before producing the configuration string

See: db8a53d86a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:32:46 +01:00
Martin Storsjö
6451c8853a sdp: Check theora colorspace before producing the configuration string
This avoids a memory leak (or having to worry about freeing the
config string) if the colorspace isn't accepted.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:46 +02:00
Michael Niedermayer
db8a53d86a avformat/sdp: fix memleak on error
Fixes CID700640
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 00:27:25 +01:00
Michael Niedermayer
77041e2474 Merge commit '094a7405e5d8463d7d167d893e04934ec1a84ecd'
* commit '094a7405e5d8463d7d167d893e04934ec1a84ecd':
  x86: ABSB: port to cpuflags
  sdp: Include SRTP crypto params if using the srtp protocol

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 16:12:24 +01:00
Martin Storsjö
611bf39bde sdp: Include SRTP crypto params if using the srtp protocol
Also print port numbers for this protocol.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 11:55:29 +02:00
Michael Niedermayer
a9b1536a01 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  bgmc: Fix av_malloc checks in ff_bgmc_init()
  rtp: set the payload type as stream id

Conflicts:
	libavformat/rtpenc_chain.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-15 11:31:13 +01:00
Luca Barbato
8034130e06 rtp: set the payload type as stream id
Support multiple video/audio streams with different format in the
same session.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-11-14 20:38:51 +01:00
Dmitry Samonenko
083c7bf701 sdp: output speex optional vbr parameter
Optional sdp speex payload parameter is outputed only when
data is encoded. It's not printed in case of stream copy.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 18:47:18 +02:00
Michael Niedermayer
ef9fe5bedd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mingw/cygwin: Stop adding -fno-common to gcc CFLAGS
  Restructure av_log_missing_feature message
  rtp: Support packetization/depacketization of opus
  file: Set the return value type for lseek to int64_t.
  ppc: fix Altivec build with old compilers
  build: add LTO support for PGI compiler
  build: add -Mdse to PGI optimisation flags
  rtpenc_vp8: Update the packetizer to the latest spec version
  rtpdec_vp8: Make the depacketizer implement the latest spec draft
  doc: allow building with old texi2html versions
  avutil: skip old_pix_fmts.h since it is just a list

Conflicts:
	libavcodec/aacdec.c
	libavcodec/h264.c
	libavcodec/ppc/fmtconvert_altivec.c
	libavcodec/utils.c
	libavformat/file.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-09 13:06:04 +02:00
Martin Storsjö
c136a813d7 rtp: Support packetization/depacketization of opus
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 11:57:11 +03:00
Michael Niedermayer
ac627b3d38 Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
  Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat

Conflicts:
	doc/examples/muxing.c
	ffmpeg.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	libavcodec/8bps.c
	libavcodec/aasc.c
	libavcodec/aura.c
	libavcodec/avcodec.h
	libavcodec/avs.c
	libavcodec/bfi.c
	libavcodec/bmp.c
	libavcodec/bmpenc.c
	libavcodec/c93.c
	libavcodec/cscd.c
	libavcodec/cyuv.c
	libavcodec/dpx.c
	libavcodec/dpxenc.c
	libavcodec/eatgv.c
	libavcodec/escape124.c
	libavcodec/ffv1.c
	libavcodec/flashsv.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/huffyuv.c
	libavcodec/iff.c
	libavcodec/imgconvert.c
	libavcodec/indeo3.c
	libavcodec/kmvc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc.c
	libavcodec/motionpixels.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pamenc.c
	libavcodec/pcxenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/pnm.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/ptx.c
	libavcodec/qdrw.c
	libavcodec/qpeg.c
	libavcodec/qtrleenc.c
	libavcodec/raw.c
	libavcodec/rawdec.c
	libavcodec/rl2.c
	libavcodec/sgidec.c
	libavcodec/sgienc.c
	libavcodec/snowdec.c
	libavcodec/snowenc.c
	libavcodec/sunrast.c
	libavcodec/targa.c
	libavcodec/targaenc.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/tmv.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/vb.c
	libavcodec/vp3.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/xwddec.c
	libavcodec/xwdenc.c
	libavcodec/yop.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_hflip.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/movenc.c
	libavformat/mxf.h
	libavformat/utils.c
	libavformat/yuv4mpeg.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libswscale/input.c
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	libswscale/x86/yuv2rgb.c
	libswscale/x86/yuv2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Anton Khirnov
716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Michael Niedermayer
e760424ddd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  nutdec: const correctness for get_v_trace/get_s_trace function arguments
  truemotion2: Request samples for old TM2 headers
  rtpdec: Remove a useless ff_ prefix from a static symbol
  rtpdec: Support depacketizing speex
  rtpenc: Add support for packetizing speex

Conflicts:
	libavformat/rtpdec.c
	libavformat/sdp.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 14:29:03 +02:00