summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h264.c
Commit message (Collapse)AuthorAge
* rtpdec: Don't free the payload context in the .free functionMartin Storsjö2015-02-24
| | | | | | | | | | | | | | 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>
* rtpdec: Don't pass non-const pointers to fmtp attribute parsing functionsMartin Storsjö2015-02-24
| | | | | | | This makes it clear that the individual parsing functions can't touch the parsed out value. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Add const to string parameters in internal fmtp parsing functionsMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_hevc: Share the implementation of fragmented packets with h264Martin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_hevc: Share the implementation of parsing a=framesize with h264Martin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Get rid of all trivial .alloc/.free functionsMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Set need_parsing via a handler fieldMartin Storsjö2015-02-24
| | | | | | | This avoids implementing a full function just to set this one field. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove an unnecessary includeMartin Storsjö2015-02-24
| | | | | | Nothing in this file use any network functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove unnecessary struct paddingMartin Storsjö2015-02-24
| | | | | | | There's no point in adding padding in the allocation of a depacketizer specific context struct. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Add missing trailing commasMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation unitsMartin Storsjö2015-02-23
| | | | | | | Only the first aggregation unit has 2 bytes (DONL) prepended, if such a field is in use. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Add a missing closing paren in a log messageMartin Storsjö2015-02-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Make reusable functions non-staticMartin Storsjö2015-02-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Fix nal type counting after refactoringMartin Storsjö2015-02-21
| | | | | | This fixes builds with -DDEBUG after f0a874799. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Prepare h264_handle_packet_stap_a for sharing with hevcMartin Storsjö2015-02-21
| | | | | | Add a parameter for skipping a number of bytes at the start of each nal. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Generalize parse_sprop_parameter_setsMartin Storsjö2015-02-21
| | | | | | | Don't write directly into an AVCodecContext, write into given pointers. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Move a leftover comment into h264_handle_packet_stap_aMartin Storsjö2015-02-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove an unnecessary checkMartin Storsjö2015-02-20
| | | | | | | | If src_len is too small for nal_size, we already print a warning above, and the next step is to check the while loop condition anyway, so this one serves no purpose. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_aMartin Storsjö2015-02-20
| | | | | | | Previously, errors were only logged but the code kept on trying, and never actually returning the error as a return value. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Make a parameter pointer constMartin Storsjö2015-02-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Use av_realloc instead of av_malloc+mempcyMartin Storsjö2015-02-20
| | | | | | This is similar to what was done for rtpdec_hevc in ced7238cd01. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Include the right header for AV_RB16Martin Storsjö2015-02-20
| | | | | | | Including libavcodec/get_bits.h is superfluous for AV_RB16 - nothing in this file uses any actual bitstream reader. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: h264: Drop the assertsLuca Barbato2015-02-15
|
* rtp: h264: Move FU-A NAL parsing to a functionLuca Barbato2015-02-15
|
* rtp: h264: Move STAP-A NAL parsing to a functionLuca Barbato2015-02-15
|
* rtp: h264: Move parse_sprop_parameter_sets parsing to a functionLuca Barbato2015-02-15
|
* rtp: h264: Move profile_level_id parsing to a functionLuca Barbato2015-02-15
|
* rtpdec: pass an AVFormatContext to ff_parse_fmtp()Anton Khirnov2014-07-09
| | | | Use it for logging, instead of NULL or the stream codec context.
* rtpdec_h264: Check the return value of functions doing allocationsMichael Niedermayer2013-12-14
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-05
|
* rtpdec: Move setting the parsing flags to the actual depacketizersMartin Storsjö2013-01-20
| | | | | | | This gets rid of almost all the codec specific details from the generic rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Pass the sequence number to depacketizersMartin Storsjö2012-12-21
| | | | | | This allows depacketizers to figure out if packets have been lost. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Don't set the pixel formatSamuel Pitoiset2012-08-28
| | | | | | | There is no need for this depacketizer to set the pixel format, the decoder can do that just fine. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove an unused includeMartin Storsjö2012-08-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* lavf: remove unnecessary inclusions of unistd.hMans Rullgard2012-06-20
| | | | | | These files do not use anything provided by unistd.h. Signed-off-by: Mans Rullgard <mans@mansr.com>
* rtpdec_h264: Add missing newlines to av_log callsMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Free old extradata before clearing the pointerMartin Storsjö2012-05-05
| | | | | | | This avoids memory leaks if there actually was some extradata set before. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Reorder code blocksMartin Storsjö2012-05-05
| | | | | | This removes one level of indentation. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Make start_sequence a static const arrayMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Cleanup debug packet type countingMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Cosmetic cleanupMartin Storsjö2012-05-05
| | | | | | | Add/fix spacing, split long lines, align assignments where suitable. Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Clean up commentsMartin Storsjö2012-05-05
| | | | | | | | | Split long comments, move long comments at the end of lines to separate lines above, fix vertical alignment, fix up comment style (unify trailing dots - comments had a mix of 2, 3 or 4 dots, where it would be just as good without them at all). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Convert commented out code into setting an unused variableMartin Storsjö2012-05-05
| | | | | | | It is worth keeping instead of removing, in case reading this bit becomes necessary at some later point. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove a useless ifdefMartin Storsjö2012-05-05
| | | | | | assert is a no-op if DEBUG isn't defined. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove outdated/useless/incorrect commentsMartin Storsjö2012-05-05
| | | | | | | RTCP is handled elsewhere, not in the depacketizer for an individual format. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Remove useless memory corruption checksMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Return proper error codesMartin Storsjö2012-05-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Check the available data length before readingMartin Storsjö2012-05-05
| | | | | | This makes sure the length is checked for STAP-A type packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_h264: Add input size checksIvan Kovtunov2012-05-05
| | | | | | This fixes crashes if given too short data packets. Signed-off-by: Martin Storsjö <martin@martin.st>