Commit Graph

15 Commits

Author SHA1 Message Date
Andreas Rheinhardt c1e439d7e9 avformat: Forward errors where possible
It is not uncommon to find code where the caller thinks to know better
what the return value should be than the callee. E.g. something like
"if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit
changes several instances of this to instead forward the actual error.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-12 19:25:33 +01:00
Carl Eugen Hoyos dc77e64f2d lavf/rtpdec*: Constify all RTPDynamicProtocolHandler.
Reviewed-by: Muhammad Faiz
2018-02-14 01:14:35 +01:00
Michael Niedermayer 3130e5be92 Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'
* commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd':
  rtpdec: Rename the free method to close

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:58:39 +01:00
Michael Niedermayer 7d9b06eb17 Merge commit '199fb40278146c5bb162990c66ad3cd561abc780'
* commit '199fb40278146c5bb162990c66ad3cd561abc780':
  rtpdec: Use ffio_free_dyn_buf

Conflicts:
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_svq3.c
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:42:14 +01:00
Michael Niedermayer fa80b76b11 Merge commit 'bb4a310bb85f43e62240145a656b1e5285b14239'
* commit 'bb4a310bb85f43e62240145a656b1e5285b14239':
  rtpdec: Don't free the payload context in the .free function

Conflicts:
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_mpegts.c
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:25:12 +01:00
Michael Niedermayer 3804d73e46 Merge commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8'
* commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8':
  rtpdec: Get rid of all trivial .alloc/.free functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:55:20 +01:00
Michael Niedermayer 11fb625858 Merge commit '2b982e92f42a6e661d90b12b6592cd13cae496d4'
* commit '2b982e92f42a6e661d90b12b6592cd13cae496d4':
  rtpdec: Set need_parsing via a handler field

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:34:08 +01:00
Martin Storsjö d594dbecce rtpdec: Rename the free method to close
Many of these functions were named foo_free_context, and since
the functions no longer should free the context itself, only
allocated elements within it, the previous naming was slightly
misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:50 +02:00
Martin Storsjö 199fb40278 rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:44 +02:00
Martin Storsjö bb4a310bb8 rtpdec: Don't free the payload context in the .free function
This makes it more consistent with depacketizers that don't have any
.free function at all, where the payload context is freed by the
surrounding framework. Always free the context in the surrounding
framework, having the individual depacketizers only free any data
they've specifically allocated themselves.

This is similar to how this works for demuxer/muxers/codecs - a
component shouldn't free the priv_data that the framework has
allocated for it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:35 +02:00
Martin Storsjö 5d8cae4573 rtpdec: Get rid of all trivial .alloc/.free functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:19 +02:00
Martin Storsjö 2b982e92f4 rtpdec: Set need_parsing via a handler field
This avoids implementing a full function just to set this one
field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:22:41 +02:00
Michael Niedermayer 17384b1719 Merge commit '5e5583efe41662294c5e1b76499ba338557f808d'
* commit '5e5583efe41662294c5e1b76499ba338557f808d':
  libavformat: add AC3 RTP depacketization (RFC 4184)

Conflicts:
	Changelog
	libavformat/rtpdec_ac3.c
	libavformat/version.h

See: 3eec775b21
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 00:48:27 +01:00
Gilles Chanteperdrix 5e5583efe4 libavformat: add AC3 RTP depacketization (RFC 4184)
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:32 +02:00
Gilles Chanteperdrix 3eec775b21 avformat/rtpdec_ac3: add AC3 RTP depacketization (RFC 4184)
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14 20:13:52 +01:00