Commit Graph

10933 Commits

Author SHA1 Message Date
Michael Niedermayer
8a0118b4b4 ffio_read: dont spam the user at EOF with a truncation error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 12:41:57 +02:00
Michael Niedermayer
5710dbf88c mpegts: Fix potential memory leak in mpegts_read_packet()
This leak can happen in case of some error paths.

Found-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 05:21:47 +02:00
Michael Niedermayer
9a27fd12f3 avio: replace ETIMEDOUT by EIO
ETIMEDOUT is not available on all platforms

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 02:28:20 +02:00
Derek Buitenhuis
af2a17c09a cache: Only include unistd.h if it exists
This follows suite from f3be359707.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 19:29:58 +02:00
Ronald S. Bultje
f3be359707 file: Only include unistd.h if it exists
It is included for the open/read/write/close functions. On
MSVC, where this header does not exist, the same functions
are provided by io.h, which is already included.

On windows, these functions are provided by io.h. Make sure
io.h is included if it exists, regardless of the setmode
function.

Signed-off-by: Martin Storsjö <martin@martin.st>

Conflicts:

	configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 18:41:23 +02:00
Ronald S. Bultje
9d0bc5c0bd rtpdec: Don't explicitly include unistd.h any longer
unistd.h used to be required for gethostname. On windows, gethostname
is provided by winsock2.h. Now network.h includes both unistd.h and
winsock2.h if they exist.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 18:41:14 +02:00
Derek Buitenhuis
1d4c4b0fbc wtvdec: Remove unused strings.h header
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 18:24:50 +02:00
Stefano Sabatini
25f139e72f lavf/utils: fix typo in has_codec_parameters
Replace "unspecified sample size" with "unspecified frame size". +10l.
2012-09-07 14:31:37 +02:00
Tomas Härdin
d74af89317 img2dec: Don't leave AVIOContexts open on zero byte files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 14:10:19 +02:00
Michael Niedermayer
fa85118510 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov_chan: Pass a separate AVIOContext for reading
  af_asyncts: check return value from lavr when flushing.
  mss2: simplify loop in decode_rle()
  mss12: avoid unnecessary division in arith*_get_bit()
  mss2: do not try to read too many palette entries
  mpegvideo: set AVFrame fields to NULL after freeing the base memory
  configure: Set the right cc_e flags for msvc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 13:50:24 +02:00
Michael Niedermayer
a7fbc7d7b7 lavf: factor codec id forcing out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 13:16:04 +02:00
Samuel Pitoiset
9afb7061f9 mov_chan: Pass a separate AVIOContext for reading
This fixes crashes when called from rtpdec_qt, where
AVFormatContext->pb is null, a crash present since 3bab7cd128.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-07 10:49:35 +03:00
Stefano Sabatini
da2ea7c33c lavf/flvenc: apply various log fixes/clarifications
Should improve user feedback in case of errors.
2012-09-06 23:39:57 +02:00
Stefano Sabatini
1bd6b0c927 lavf/flvenc: return meaningful error codes 2012-09-06 23:39:57 +02:00
rogerdpack
ef122ff507 eliminate some mingw warnings
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-06 04:42:43 +02:00
Stefano Sabatini
29e972f67c lavu/parseutils: add av_small_strptime()
Make internal small_strptime() function public, and use it in place of
strptime().
This allows to avoid a dependency on strptime() on systems which do not
support it.

In particular, fix trac ticket #992.
2012-09-06 00:40:01 +02:00
Clément Bœsch
5620088494 lavf: fix a few typo in some comments. 2012-09-05 23:22:35 +02:00
Clément Bœsch
9d9f34a3c1 lavf: remove a few useless AV_NOWARN_DEPRECATED().
read_seek was undeprecated in e5c708151.
2012-09-05 23:18:07 +02:00
Michael Niedermayer
d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Michael Niedermayer
99de3df3d3 Merge commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078'
* commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078':
  avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Conflicts:
	libavcodec/libvpxenc.c
	libavcodec/options_table.h
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:09:09 +02:00
Michael Niedermayer
d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer
9dcc4c30f9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: add support for bdver1 and bdver2 CPU types.
  avio: make avio_close NULL the freed buffer
  pixdesc: cosmetics
  proresenc: Don't free a buffer not owned by the codec
  proresenc: Write the full value in one put_bits call
  adpcmenc: Calculate the IMA_QT predictor without overflow
  x86: Add convenience macros to check for CPU extensions and flags
  x86: h264dsp: drop some unnecessary ifdefs around prototype declarations
  mss12: merge decode_pixel() and decode_top_left_pixel()
  mss12: reduce SliceContext size from 1067 to 164 KB
  mss12: move SliceContexts out of the common context into the codec contexts

Conflicts:
	libavformat/aviobuf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-04 17:04:51 +02:00
Luca Barbato
3093939077 avio: make avio_close NULL the freed buffer 2012-09-04 15:04:46 +02:00
Stefano Sabatini
838b1d60a1 lavf/segment: add EXT-X-MEDIA-SEQUENCE tag in M3U8 header 2012-09-04 11:28:16 +02:00
Stefano Sabatini
ebd703f0a0 lavf/segment: deprecate "ext" format in favor of "csv"
The new option name is more descriptive.
2012-09-04 11:27:55 +02:00
Stefano Sabatini
d815763548 lavf/segment: add escaping for filename field of the CSV list file
CSV escaping code is borrowed from ffprobe.c.
2012-09-04 11:25:14 +02:00
Peter Ross
299489714a tty: return av_get_packet() error codes instead of converting them to EIO
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-04 06:12:18 +02:00
Peter Ross
bf959ac2c6 tty: return EOF when the 'effective' end of file is reached. ('effective' because ansi/tty files may be concatenated with SAUCE/EFI metadata)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-04 06:12:10 +02:00
Michael Niedermayer
e6dc0da504 rmdec: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-03 22:40:41 +02:00
Stefano Sabatini
f7eec8956d lavf/segment: set EXT-X-VERSION to 3 rather than to 4
There is nothing we use of the latest version, downgrade version number
to increase decoding support.

Based on this comment by vel2000:
http://ffmpeg.org/trac/ffmpeg/ticket/1642#comment:17
2012-09-02 10:42:25 +02:00
Michael Niedermayer
4654bf44a7 flvdec: fix creation of lots of phantom data streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-02 05:04:14 +02:00
Michael Niedermayer
19a71dbcb9 psxstr: more correct array type.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 23:45:32 +02:00
Roman Arutyunyan
c0daa73a0f fix flv new stream handling after head already parsed
This fixes stream lookup in flv demuxer. When used with librtmp
protocol streams are sometimes added after head arrived. If the
first stream added in flv header reader is Audio stream then it
is messed with Video stream added later in the code patched.
The result is I have 2 Audio streams (first of them is said to have
a video codec like h264) instead of Audio/Video pair.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 17:49:33 +02:00
Piotr Bandurski
5081310b58 lavf: add missing new line to some error messages 2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 17:35:21 +02:00
Piotr Bandurski
08277a45c3 lavf: add missing new line to some error messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 15:59:30 +02:00
Michael Niedermayer
899101d3d3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  crypto: Remove a stray double space
  Rename missed cases of FF_OPT_TYPE_* to AV_OPT_TYPE_*

Conflicts:
	libavfilter/vf_delogo.c
	libavfilter/vf_lut.c
	libavfilter/vsrc_testsrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 14:09:32 +02:00
Philip Langdale
9d89c8b3ac matroskadec, matroskadec, srtenc: Read/Write duration for subtitles.
After much discussion and back-and-forth, we reached the conclusion
that matroska uses convergence_duration for subtitle duration because
a 32bit value isn't large enough to store the duration if sub-micro-second
timebases are used. Matroska may not be the only one that supports these
timebases, but it's certainly the only one that ffmpeg attempts to support
in this way.

The long term solution that we seemed to reach was that if we encounter
a matroska file with a sub-micro-second timebase, we should internally
scale it up to at least micro-second, and then duration can be used
normally. This suggests that on the encode side, we should not allow
generation of files with sub-micro-second timebases, but that's a separate
issue.

That being a non-trivial change, and the subtitle interoperability breakage
being very real, I'm re-submitting this small change for consideration.

In this diff, we make sure that duration is populated by the matroska
demuxer, and that convergence_duration is respected in matroskaenc and
srtenc, but that duration is used otherwise. This ends up being a strict
improvement - pipelines that use convergence duration are unchanged, and
ones that are currently broken due to the duration mismatch will start
working - except for the ones with the extreme timebases, but those were
already broken.

Signed-off-by: Philip Langdale <philipl@overt.org>
2012-08-31 20:22:49 -07:00
Martin Storsjö
12c8912de2 crypto: Remove a stray double space
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-31 23:27:27 +02:00
Piotr Bandurski
5059162659 flic: use AV_LOG_ERROR for error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 23:04:05 +02:00
Piotr Bandurski
d2b927d4fc filmstripdec: add new line to error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 23:03:18 +02:00
Reimar Döffinger
dddd006cab wtvdec: set correct codec ID for CC streams.
Closed caption data is definitely not teletext.
Since it contains a EIA-608 compatibility stream,
the EIA_608 codec ID is at least not completely wrong.
Fixes subtitle playback in MPlayer with the sample in
trac ticket #1482.
To fix the ticket itself I expect FFmpeg will need
a closed-caption to SRT decoder first.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-08-31 19:58:09 +02:00
Michael Niedermayer
d7587ba1c6 flvdec: remove duplicate return
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 15:45:23 +02:00
Michael Niedermayer
e234301c2c bintext: remove stray ;
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 15:20:57 +02:00
Michael Niedermayer
c617bed34f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MSS1 and MSS2: set final pixel format after common stuff has been initialised
  MSS2 decoder
  configure: handle --disable-asm before check_deps
  x86: Split inline and external assembly #ifdefs
  configure: x86: Separate inline from standalone assembler capabilities
  pktdumper: Use a custom define instead of PATH_MAX for buffers
  pktdumper: Use av_strlcpy instead of strncpy
  pktdumper: Use sizeof(variable) instead of the direct buffer length

Conflicts:
	Changelog
	configure
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/dct-test.c
	libavcodec/imgconvert.c
	libavcodec/mss12.c
	libavcodec/version.h
	libavfilter/x86/gradfun.c
	libswscale/x86/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 13:34:32 +02:00
Alberto Delmás
ee769c6a7c MSS2 decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-08-31 07:37:16 +02:00
Michael Niedermayer
19d8954966 find_stream_info: update last_dts more often
This improves dts validity checks and consequently fps detection of files with invalid dts
Fixes Ticket1681

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-30 23:48:54 +02:00
Michael Niedermayer
370bb893d2 mp3enc: fix const correctness
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-30 17:56:38 +02:00