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>
11 years ago
Martin Storsjö
ff394ca087
rtpdec_h264: Add a missing closing paren in a log message
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Martin Storsjö
0de0751084
rtpdec_h264: Make reusable functions non-static
Signed-off-by: Martin Storsjö <martin@martin.st>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years ago
Martin Storsjö
bb8c6ac840
rtpdec_h264: Make a parameter pointer const
Signed-off-by: Martin Storsjö <martin@martin.st>
11 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>
11 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>
11 years ago
Kevin Wheatley
88868d81a5
avformat/rtpdec_h264: fix compile failure with -DDEBUG
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
53367b34e1
rtp: h264: Drop the asserts
11 years ago
Luca Barbato
3b33dfb23c
rtp: h264: Move FU-A NAL parsing to a function
11 years ago
Luca Barbato
f0a8747996
rtp: h264: Move STAP-A NAL parsing to a function
11 years ago
Luca Barbato
a9a0b8d6c1
rtp: h264: Move parse_sprop_parameter_sets parsing to a function
11 years ago
Luca Barbato
b8df0b71c5
rtp: h264: Move profile_level_id parsing to a function
11 years ago
Michael Niedermayer
81a663f49e
Drop remaining unneeded != NULL
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 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>
12 years ago
Michael Niedermayer
c5f15f40b9
avformat/rtpdec_h264: fix null pointer dereferences
Fixes CID733716
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
7abd35a1ff
avformat: Add av_cold attributes to init functions missing them
13 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>
13 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>
13 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>
14 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>
14 years ago
Martin Storsjö
3c148703f6
rtpdec_h264: Reorder code blocks
This removes one level of indentation.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
b368861747
rtpdec_h264: Make start_sequence a static const array
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
48666c2bd6
rtpdec_h264: Cleanup debug packet type counting
Signed-off-by: Martin Storsjö <martin@martin.st>
14 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>
14 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>
14 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>
14 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>
14 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>
14 years ago
Martin Storsjö
5a571d3241
rtpdec_h264: Remove useless memory corruption checks
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
b7b7354c33
rtpdec_h264: Return proper error codes
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
5245adb963
rtpdec_h264: Check the available data length before reading
This makes sure the length is checked for STAP-A type packets.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Ivan Kovtunov
de26a4b699
rtpdec_h264: Add input size checks
This fixes crashes if given too short data packets.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
456001486e
rtsp: Don't expose the MS-RTSP RTX data stream to the caller
This avoids exposing a dummy AVStream which won't get any data
and which will make avformat_find_stream_info wait for info about
this stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Matthew Szatmary
7dfe8f5557
rtpdec: Use 4 byte startcodes for H.264
If muxing into mpegts, 4 byte startcodes for the first NAL
of an access unit is required. Thus it is simplest for the
RTP depacketizer to just use 4 byte startcodes everywhere.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Martin Storsjö
9261e6cf3f
rtp: Rename the open/close functions to alloc/free
This avoids clashes if we internally want to override the global
open function.
Signed-off-by: Martin Storsjö <martin@martin.st>
15 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
15 years ago
Martin Storsjö
86042de8a5
rtpdec_h264: Pass NAL type 0 through
According to the spec, this type shouldn't ever be used. Nevertheless,
passing it through enables decoding streams which otherwise aren't
decodeable.
Originally committed as revision 25897 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
965a3ddb1f
Remove mostly unnecessary rtpdec_*.h files, store the declarations in one file
Originally committed as revision 24596 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Luca Barbato
dc6cf61e33
Handle av_base64_decode return value
garbled sdp would cause crash otherwise.
Originally committed as revision 24191 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago