Commit Graph

10301 Commits

Author SHA1 Message Date
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>
2015-02-21 11:32:31 +02:00
Hendrik Leppkes 3fe26bb608 hlsenc: write playlist into a temp file and replace the original atomically
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 23:55:28 +02:00
Hendrik Leppkes ff48ae94f9 hlsenc: remove the AVIOContext for the playlist from the muxer context
Its only used in one function, having it in the context serves no purpose.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 23:55:27 +02:00
Martin Storsjö 46ad9ac964 rtpdec_h264: Move a leftover comment into h264_handle_packet_stap_a
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:30:05 +02:00
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>
2015-02-20 19:29:58 +02:00
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>
2015-02-20 19:29:39 +02:00
Martin Storsjö bb8c6ac840 rtpdec_h264: Make a parameter pointer const
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:29:34 +02:00
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>
2015-02-20 19:29:29 +02:00
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>
2015-02-20 19:28:44 +02:00
Martin Storsjö ba2e07909b rtpdec_vp8: Set the keyframe flag
This allows the output to be used with stream copy, which discards
packet from the start until the first keyframe.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:28:28 +02:00
Oleksij Rempel 062cd5a975 lavf: Add DSS demuxer
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-19 12:05:19 -05:00
Vittorio Giovara 195942ed9b riff: Support QT RLE Animation in avi ('rle ' FourCC)
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-17 12:18:20 -05:00
Vittorio Giovara c78dc12118 riff: Support ProRes in avi (APCH fourcc)
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-17 12:18:20 -05:00
Hugo Beauzée-Luyssen 3035d21b5a nutdec: Check memory allocations
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-17 12:16:43 -05:00
Hugo Beauzée-Luyssen a876585215 movenc: Check memory allocations
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-17 12:16:43 -05:00
Hugo Beauzée-Luyssen da7e31a240 rmdec: Check memory allocations from ff_rm_alloc_rmstream()
Bug-Id: CID 1257835
2015-02-17 12:16:43 -05:00
Vittorio Giovara bb7701684c lavf: Document the codec context initialization
During remuxing avcodec_copy_context() is discouraged as certain fields
(such as codec_tag) could reflect invalid values between input and
output contextes.
2015-02-17 11:27:42 -05:00
Vittorio Giovara 5dc47a2bd5 matroskaenc: Validate chapter start and end times
CC: libav-stable@libav.org
Bug-Id: CID 1265717
2015-02-17 11:27:41 -05:00
Yusuke Nakamura 4abfa387b8 mov: Change DTS-based seek into CTS-based seek.
CTS-based seek is reasonable since player requests frames in output order
not coded order.

This change fixes seek to a keyframe within consecutive keyframes.
Let's say P[0|-1] and P[1|0], here x and y inside [x|y] are PTS and DTS
respectively, and both two frames are a keyframe. If you try to seek on
PTS=0, i.e. P[0|-1], you'll get P[1|0] if the demuxer is DTS based. This
is obviously undesirable.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-15 21:26:04 +02:00
Luca Barbato e1a57cbb1c ape: Use the proper variable type
Avoid an unsigned underflow.

Bug-Id: 1041122
CC: libav-stable@libav.org
2015-02-15 18:20:54 +01:00
Federico Tomassetti b4cda0a999 ogg: check memory allocations
Bug-Id: CID 1257795
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-15 18:20:54 +01:00
Luca Barbato 53367b34e1 rtp: h264: Drop the asserts 2015-02-15 18:20:54 +01:00
Luca Barbato 3b33dfb23c rtp: h264: Move FU-A NAL parsing to a function 2015-02-15 18:20:54 +01:00
Luca Barbato f0a8747996 rtp: h264: Move STAP-A NAL parsing to a function 2015-02-15 18:20:54 +01:00
Luca Barbato a9a0b8d6c1 rtp: h264: Move parse_sprop_parameter_sets parsing to a function 2015-02-15 18:20:54 +01:00
Luca Barbato b8df0b71c5 rtp: h264: Move profile_level_id parsing to a function 2015-02-15 18:20:54 +01:00
Diego Biurrun 36cf8eb448 mov: Fix compilation with DEBUG enabled 2015-02-14 10:45:16 -08:00
Diego Biurrun daf8cf358a avformat: Don't anonymously typedef structs 2015-02-14 10:13:47 -08:00
wm4 9deaec7828 lavf: move internal fields from public to internal context
This is not an API change; the fields were explicitly declared private
before.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-10 21:45:04 +01:00
Anton Khirnov 1509c018bd mpegts: relax restrictions on matching the packet start in read_header
analyze() is currently called both when probing and from read_header().
It determines the packet start by looking for the sync byte, followed by
unset Transport Error Indicator and valid adaptation_field_control.

This makes sense to do when probing, but once we already know the format
is MPEG-TS, it is counterproductive to be so strict -- e.g. in some
files the TEI might be set and analyze() might get called with a smaller
buffer than the one used for probing, resulting in a failure.
2015-02-10 21:43:44 +01:00
wm4 6a5b8ca432 lavf: remove unused code
Nothing uses it, and it provides no public API.

Archeological finds:

Commit 101036adb9 added the API.
Commit a8dd8dc6e9 made mpegts.c use it.
Commit af8aae3fa3 disabled it by default in mpegts.c.
Commit ae2bb52cd2 removed all uses of this from mpegts.c.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-08 21:34:05 +01:00
Luca Barbato e352520e3e oma: Report a timestamp
Reported-By: jb@videolan.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-07 15:36:15 +01:00
Luca Barbato 898276c16b r3d: Fix pos type
avio_tell can return a negative number.

Bug-Id: CID 1265715
CC: libav-stable@libav.org
2015-02-03 15:23:22 +00:00
Vittorio Giovara ec524ed12a tta: Fix framepos and start_offset types
Also propagate errors.

CC: libav-stable@libav.org
Bug-Id: CID 1238812
2015-02-03 15:23:21 +00:00
Carl Eugen Hoyos 67e9f3907d isom: Decode Prores 4444 XQ with the existing Prores decoder
The frames seem to contain a higher bitrate which our decoder is
able to handle.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-03 15:23:21 +00:00
Hendrik Leppkes e3528d2a7b mov: Implement parsing of the "HandlerName" from the MP4 HDLR atom
This atom typically is used for a track title. The handler name is stored
as a Pascal string in the QT specs (first byte is the length of the string),
so do not export it.

A second length check based on the first character is added to avoid
overwriting an already specified handler_name (it happens with YouTube
videos for instance, the handler_name get masked), or specifying an
empty string metadata.

The Pascal string fix and the second length check are written
by Clément Bœsch <clement.boesch@smartjog.com>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-03 15:15:12 +00:00
Diego Biurrun 27b99d929f siff: Return more meaningful error values 2015-02-03 14:55:40 +00:00
Diego Biurrun 75439bb31b siff: K&R formatting cosmetics 2015-02-03 14:53:44 +00:00
Luca Barbato f726fc21ef ogg: Provide an option to offset the serial number
The ogg serial number doubles as codec id and sequence
value for concatenated samples.
2015-02-01 02:28:40 +01:00
Vittorio Giovara 08fa34bf75 yuv4mpegdec: initialize field_order in yuv4_read_header()
CC: libav-stable@libav.org
Bug-Id: CID 1265721
2015-01-29 15:26:33 +00:00
Luca Barbato 3c18a7b188 avio: Do not consider the end-of-buffer position valid
Trigger a refill if the seek action moves the pointer
at the end of the buffer.

Before this patch the read action following the seek would trigger
the refill, while write action would write outside the buffer.

In the Libav codebase few muxers seek forward outside of what
already has been written so it is quite unlikely to experience
the problem with the default buffer size.

CC: libav-stable@libav.org
2015-01-28 16:28:10 +01:00
Vittorio Giovara e71149a7a5 nuv: validate image size
Avoid a division by zero.

CC: libav-stable@libav.org
Bug-Id: CID 717750
2015-01-27 15:26:37 +00:00
Vittorio Giovara 7c51d79ca7 nsvdec: validate channels and samplerate
Avoid a division by zero.

CC: libav-stable@libav.org
Bug-Id: CID 717749
2015-01-27 15:26:37 +00:00
Anton Khirnov 3212578148 mov: export audio service type as side data 2015-01-27 09:21:28 +01:00
Anton Khirnov 4227e4fe74 lavf: add a convenience function for adding side data to a stream 2015-01-27 09:18:32 +01:00
Anton Khirnov 80a11de7dc nutenc: do not use has_b_frames
It is unreliable, especially when the stream codec context is not the
encoding context. Use the codec descriptor properties instead.
2015-01-27 09:15:07 +01:00
Anton Khirnov f771b3ab5d avidec: do not export stream_codec_tag
Handle its only existing use case internally.
2015-01-27 09:13:45 +01:00
Vittorio Giovara 3a6dfec864 segment: Check av_get_frame_filename() return value
CC: libav-stable@libav.org
Bug-Id: CID 1265713
2015-01-23 14:55:03 +00:00
Vittorio Giovara 7915e6741d hlsproto: Properly close avio buffer in case of error
Fix a memory leak.

CC: libav-stable@libav.org
Bug-Id: CID 717999
2015-01-23 14:55:03 +00:00
Vittorio Giovara 4c5fa628da mov: Do not compute negative SAR values
This partially reverts cf70ba37ba, since
it didn't take into account when rotation is 0, but there is another
valid operation (eg. translation) in the matrix.

Found-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-23 14:54:59 +00:00