Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
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>
10 years ago
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>
10 years ago
Martin Storsjö
ec96a89c3e
rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions
...
This makes it clear that the individual parsing functions can't
touch the parsed out value.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
ac0e54fda9
rtpdec: Add const to string parameters in internal fmtp parsing functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
3567b91e49
rtpdec_hevc: Share the implementation of fragmented packets with h264
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
8633fb47db
rtpdec_hevc: Share the implementation of parsing a=framesize with h264
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
5d8cae4573
rtpdec: Get rid of all trivial .alloc/.free functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
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>
10 years ago
Martin Storsjö
0752f700d6
rtpdec_h264: Remove an unnecessary include
...
Nothing in this file use any network functions.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
247764a592
rtpdec_h264: Remove unnecessary struct padding
...
There's no point in adding padding in the allocation of a depacketizer
specific context struct.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
3cd5828fc0
rtpdec: Add missing trailing commas
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
fe208ca54b
rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units
...
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>
10 years ago
Martin Storsjö
ff394ca087
rtpdec_h264: Add a missing closing paren in a log message
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
0de0751084
rtpdec_h264: Make reusable functions non-static
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
16163e6bf2
rtpdec_h264: Fix nal type counting after refactoring
...
This fixes builds with -DDEBUG after f0a874799
.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
a3cc519d1f
rtpdec_h264: Prepare h264_handle_packet_stap_a for sharing with hevc
...
Add a parameter for skipping a number of bytes at the start of each nal.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
48183b3ad4
rtpdec_h264: Generalize parse_sprop_parameter_sets
...
Don't write directly into an AVCodecContext, write into given
pointers.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
46ad9ac964
rtpdec_h264: Move a leftover comment into h264_handle_packet_stap_a
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
a335ed7671
rtpdec_h264: Remove an unnecessary check
...
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>
10 years ago
Martin Storsjö
176903ce83
rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_a
...
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>
10 years ago
Martin Storsjö
bb8c6ac840
rtpdec_h264: Make a parameter pointer const
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
7650caf013
rtpdec_h264: Use av_realloc instead of av_malloc+mempcy
...
This is similar to what was done for rtpdec_hevc in ced7238cd0
.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
8bdbf49c6f
rtpdec_h264: Include the right header for AV_RB16
...
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>
10 years ago
Luca Barbato
53367b34e1
rtp: h264: Drop the asserts
10 years ago
Luca Barbato
3b33dfb23c
rtp: h264: Move FU-A NAL parsing to a function
10 years ago
Luca Barbato
f0a8747996
rtp: h264: Move STAP-A NAL parsing to a function
10 years ago
Luca Barbato
a9a0b8d6c1
rtp: h264: Move parse_sprop_parameter_sets parsing to a function
10 years ago
Luca Barbato
b8df0b71c5
rtp: h264: Move profile_level_id parsing to a function
10 years ago
Anton Khirnov
0307cc2253
rtpdec: pass an AVFormatContext to ff_parse_fmtp()
...
Use it for logging, instead of NULL or the stream codec context.
11 years ago
Michael Niedermayer
9aba0a6f7b
rtpdec_h264: Check the return value of functions doing allocations
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Diego Biurrun
7abd35a1ff
avformat: Add av_cold attributes to init functions missing them
12 years ago
Martin Storsjö
c6f1dc8e4c
rtpdec: Move setting the parsing flags to the actual depacketizers
...
This gets rid of almost all the codec specific details from the
generic rtpdec code.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
90c784cc13
rtpdec: Pass the sequence number to depacketizers
...
This allows depacketizers to figure out if packets have been lost.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Samuel Pitoiset
6af2480aa6
rtpdec_h264: Don't set the pixel format
...
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>
13 years ago
Martin Storsjö
c864e461d2
rtpdec: Remove an unused include
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Mans Rullgard
4e5a514813
lavf: remove unnecessary inclusions of unistd.h
...
These files do not use anything provided by unistd.h.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Martin Storsjö
2ed503af9f
rtpdec_h264: Add missing newlines to av_log calls
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
b97d21e4d6
rtpdec_h264: Free old extradata before clearing the pointer
...
This avoids memory leaks if there actually was some extradata
set before.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
3c148703f6
rtpdec_h264: Reorder code blocks
...
This removes one level of indentation.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
b368861747
rtpdec_h264: Make start_sequence a static const array
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
48666c2bd6
rtpdec_h264: Cleanup debug packet type counting
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
0b3ac9fe05
rtpdec_h264: Cosmetic cleanup
...
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>
13 years ago
Martin Storsjö
f3d471f45f
rtpdec_h264: Clean up comments
...
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>
13 years ago
Martin Storsjö
dee48d095d
rtpdec_h264: Convert commented out code into setting an unused variable
...
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>
13 years ago
Martin Storsjö
44f99fe0f5
rtpdec_h264: Remove a useless ifdef
...
assert is a no-op if DEBUG isn't defined.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
8d43b8b8e8
rtpdec_h264: Remove outdated/useless/incorrect comments
...
RTCP is handled elsewhere, not in the depacketizer for an
individual format.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
5a571d3241
rtpdec_h264: Remove useless memory corruption checks
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
b7b7354c33
rtpdec_h264: Return proper error codes
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago