A file with a prepended ID3 tag of an uneven length was found
in the wild.
Check if the wav data starts at an uneven offset and use that
information to correct the seeking calculation in wav_seek_tag,
which used to only seek to even byte positions.
Regression since ac87eaf856
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
An SDP description normally only contains the target IP address
and port for the packets. This means that we don't really have
any clue where to send the RTCP RR packets - previously they're
sent to the destination IP written in the SDP (at the same port),
which rarely is the actual peer. And if the source for the packets
is on a different port than the destination, it's never correct.
With a new option, we can choose to send the packets to the
address that the latest packet on each socket arrived from.
---
Some may even argue that this should be the default - perhaps,
but I'd rather keep it optional at first. Additionally, I'm not
sure if sending RTCP RR directly back to the source is
desireable for e.g. multicast.
Signed-off-by: Martin Storsjö <martin@martin.st>
If we've received packets on the same socket before, the return
packets are sent to that address. If we've only received packets
on the other socket, try to guess the source port for the other
one assuming the basic +1/-1 logic.
Signed-off-by: Martin Storsjö <martin@martin.st>
Move the sources documentation up below the marker for deprecated
otpions. Also mention the new block parameter, that was added
in 749722209.
Signed-off-by: Martin Storsjö <martin@martin.st>
It is possible to have an initial broken header and then valid packets.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
flushing just the asf demuxer but not the cores buffers leads to inconsistencies
and a "random" packet position which later causes an assertion failure
Fixes Ticket2853
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This makes the encoding of picture descriptions consistent with the
encoding of other text id3 tags and works better with iTunes, which
does not display pictures with some UTF-16 picture descriptions
(including a UTF-16 empty string, i.e. BOM + terminator). It also
saves a few bytes.
Example:
ffmpeg -f lavfi -i sine=b=4 -f lavfi -i smptebars -map 0:a -map 1:v \
-codec:a libmp3lame -codec:v mjpeg -id3v2_version 3 \
-metadata:s:v comment="Cover (front)" -t 3 -y out.mp3
This example does not set a picture description (-metadata:s:v title=)
so an empty string is written in the id3v2.3 APIC frame. Without this
patch, UTF-16 is used and the cover art does not display in iTunes.
With the patch the cover art is displayed. (Note that iTunes does not
display or have a way to set picture descriptions, only the picture
itself, but nevertheless has trouble skipping some UTF-16 descriptions.)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.
This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.
On systems not using msvcrt, the function is not duplicated.
Signed-off-by: Martin Storsjö <martin@martin.st>
This supports non-Linux systems (SOCK_CLOEXEC is non-standard) and
older Linux kernels to the extent possible.
Signed-off-by: Martin Storsjö <martin@martin.st>
When libavformat was changed to use the new avpriv_open function
in 51eb213d00, this silently bypassed the existing wrapper for
win32. Move the win32 wrapper into libavutil/file.c to make sure
it gets called everywhere (not just in the libavformat case).
This makes sure that non-ascii file names gets opened properly
(where file names internally are stored as utf8, but they get
converted to wchar_t and opened with _wsopen).
Signed-off-by: Martin Storsjö <martin@martin.st>
This provides at least some protection against potential accidental
corruption of AVIO buffer workspace.
Signed-off-by: Martin Storsjö <martin@martin.st>
It's only relevant for the RTSP demuxer. Similarly, the custom_io
flag is only present in the SDP demuxer options list.
Signed-off-by: Martin Storsjö <martin@martin.st>
'Fixes' ticket #2526 insofar as it stops 2.5.8 from crashing and
tells the user to upgrade to 2.6 if they want to make video input
work. A real solution to #2526 would be to get video input from
2.5.8 to work right.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Also clear the AVIOContext handle after freeing, to avoid
possible dangling pointers if the later call fails.
Signed-off-by: Martin Storsjö <martin@martin.st>
This lowers the level of warnings printed if trying to connect
to a host name that provides both v6 and v4 addresses but the
service only is available on the v4 address (often occurring for
'localhost', with servers that aren't v6-aware).
Signed-off-by: Martin Storsjö <martin@martin.st>
Changes since v1 of the patch:
- enable option by default
- add documentation
- move up PTS override code after PES header parsing, to ensure we use the
last PCR before the first packet of the teletext PES packet.
The option overrides teletext packet PTS and DTS values with the timestamps
calculated from the PCR of the first program which the teletext stream is part
of and is not discarded.
Using the same teletext PID for multiple programs is possible, therefore we
need some kind of heuristics to know which program PCR we should synchronize
to. Using the first non-discarded PCR pid among the programs of the teletext
stream seemed like a good choice.
The patch does not do PCR interpolation to estimate the PCR of the teltetext
packet, it just uses the last PCR of the program, which may cause a slight
error (0.1 sec) in the teletext packet pts-es.
Based on a patch by Reimar Döffinger.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131610.html
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>