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>
12 years ago
Martin Storsjö
c864e461d2
rtpdec: Remove an unused include
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 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
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>
13 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>
13 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>
13 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>
13 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>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 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
14 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
Josh Allmann
fb4ca2cb51
rtpdec: Clean up FMTP parsing code in H.264 RTP depacketizer
...
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23850 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Josh Allmann
1ed3cef513
Reindent
...
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23849 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Josh Allmann
7aa0118c46
rtpdec: Return ENOMEM if H.264 RTP fails to allocate memory for SDP extradata
...
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23848 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Luca Barbato
48790d8ba8
Remove stray and possibly wrong line, rtpdec.c sets that already
...
Originally committed as revision 23440 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
b9b8ed2a02
Properly pad H.264 extradata when taken from fmtp SDP attributes
...
This fixes some valgrind warnings.
Originally committed as revision 22182 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Martin Storsjö
f65919af7e
Rename RTP depacketizer files from rtp_* to rtpdec_*
...
Originally committed as revision 22109 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Ronald S. Bultje
3307e6ea86
Prefix non-static RTSP functions with ff_.
...
Originally committed as revision 21974 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Gordon Irlam
9cad7e2193
Fix a typo in rtp_h264.c:parse_h264_sdp_line(). Patch by Gordon Irlam
...
(gordonipub2 AT gordoni DOT com).
This fixes H.264 over RTP when the SDP contains a "framesize:" attribute
(for example, rtsp://video3.americafree.tv/AFTVCartoonsH264250.sdp )
Originally committed as revision 20463 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago