Commit Graph

8697 Commits

Author SHA1 Message Date
Michael Niedermayer
26ae9a5d7c pthreads: drop has_b_frames mangling, its buggy in many many ways,
not to mention race conditions and that its used for stream copy, used to determine IPB type by
applications and other things.
Fixes various frame drop/timestamp issues with frame multithreading.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 17:47:10 +01:00
Michael Niedermayer
b2bdca1b4a udp: simplify 7a032cb97f
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 03:51:08 +01:00
Andrey Utkin
7a032cb97f Fix segfault on UDP reading
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 03:43:52 +01:00
Michael Niedermayer
4354788a89 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  tls: Use ERR_get_error() in do_tls_poll
  indeo3: Fix a fencepost error.
  mxfdec: Fix comparison of unsigned expression < 0.
  mpegts: set stream id on just created stream, not an unrelated variable
  ra288: return error if input buffer is too small
  ra288: utilize DSPContext.vector_fmul()
  ra288: use memcpy() to copy decoded samples to output
  mace: only calculate output buffer size once
  Remove redundant filename self-references inside files.
  indeo3data: add missing config.h #include for HAVE_BIGENDIAN
  x86: drop pointless ARCH_X86 #ifdef from files in x86 subdirectory
  avplay: reset rdft when closing stream.
  doc/git-howto: expand format-patch and send-email notes.
  lavf: expand doxy for some AVFormatContext fields.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-09 02:59:49 +01:00
Michael Niedermayer
bf0ac7aa69 mpegvideo_probe: reduce score for invalid streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 23:54:25 +01:00
Martin Storsjö
f38f3b88a5 tls: Use ERR_get_error() in do_tls_poll
The return value ret isn't an error code that can be passed
to ERR_error_string().

This makes the error messages printed actually contain useful
information.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 22:58:54 +02:00
Michael Niedermayer
4e38d4ef0e mpegvideo_probe: Getting rid of the use of GCC language extensions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 21:12:42 +01:00
Michael Niedermayer
0643ff1712 mpegvideo_probe: dont be too picky on spec compliance and the lack of system startcodes.
Fixes Ticket620

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 20:29:39 +01:00
Michael Niedermayer
b52f2d88fe mpegvideo_probe: count video and audio pes seperately
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 20:29:06 +01:00
Michael Niedermayer
26d7eb40fd mpegvideo probe: fix slice counting
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 20:27:17 +01:00
Alex Converse
735e601be1 mxfdec: Fix comparison of unsigned expression < 0.
'size' is populated by functions returning int64_t and int that return
negative error codes.
2011-11-08 10:59:52 -08:00
Anton Khirnov
3110ad8329 mpegts: set stream id on just created stream, not an unrelated variable
Bug introduced in 84ad31ff18.
Thanks to Uoti Urpala for finding it.
2011-11-08 18:56:39 +01:00
Michael Niedermayer
4b7ef5a1e6 flv: Skip invalid index
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 17:39:39 +01:00
Anton Khirnov
83daced0a3 lavf: expand doxy for some AVFormatContext fields. 2011-11-08 14:25:24 +01:00
Carl Eugen Hoyos
4d7c71c364 Check for OOM after av_mallocz() in ff_interleave_add_packet().
Fixes a crash with the sample from Ubuntu bug #869125.
2011-11-08 10:35:14 +01:00
Carl Eugen Hoyos
8a3f976498 Support decoding "m1v " mpeg1video in mov.
Fixes ticket #579 at least for ffplay.
2011-11-08 10:33:21 +01:00
Carl Eugen Hoyos
6aaf6db253 Support decoding transport streams from Sony NXCAM.
Fixes ticket #617.
2011-11-08 10:30:37 +01:00
Michael Niedermayer
0bd42ae72c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avformat: Avoid a warning about mixed declarations and code
  BMV demuxer and decoder
  matroskaenc: Make sure the seekhead struct is freed even on seek failure
  mpeg12enc: Remove write-only variables.
  mpeg12enc: Don't set up run-level info for level 0.
  msmpeg4: Don't set up run-level info for level 0.
  avformat: Warn about using network functions without calling avformat_network_init
  avformat: Revise wording
  rdt: Set AVFMT_NOFILE on ff_rdt_demuxer
  rdt: Check the return value of avformat_open
  rtsp: Discard the dynamic handler, if it has an alloc function which failed
  dsputil: use cpuflags in x86 versions of vector_clip_int32()

Conflicts:
	libavcodec/avcodec.h
	libavcodec/version.h
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 02:03:14 +01:00
Michael Niedermayer
4717e29796 flvdec: skip duplicate indexes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-08 00:09:44 +01:00
Martin Storsjö
1c8c41ff07 avformat: Avoid a warning about mixed declarations and code
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 01:02:14 +02:00
Kostya Shishkov
f545e00677 BMV demuxer and decoder
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 00:36:45 +02:00
Miroslav Slugeň
df9c1cfb48 libavformat: add support for G726 audio decoder in RTP and RTSP streams
Fixes Ticket611

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 21:55:34 +01:00
Martin Storsjö
44729bc020 matroskaenc: Make sure the seekhead struct is freed even on seek failure
The caller expects the seekhead struct to be freed when calling
matroska_write_seekhead. Currently, the structure is leaked if the
seek fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 22:23:17 +02:00
Martin Storsjö
ce145690b6 avformat: Warn about using network functions without calling avformat_network_init
This is to make developers aware of the fact that they will
start using the new init function at some point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 19:29:33 +02:00
Martin Storsjö
87892ef8a6 avformat: Revise wording
It might make sense not to make the function completely mandatory
immediately at the next bump, which might be quite soon after
the function was introduced.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 19:29:32 +02:00
Martin Storsjö
0882689116 rdt: Set AVFMT_NOFILE on ff_rdt_demuxer
This makes rdt work again, which has been broken since
603b8bc2a1. This commit made
opening a demuxer without a file (or in this case, with a filename
which can't be opened) fail, unless the demuxer actually declared
AVFMT_NOFILE.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 11:24:10 +02:00
Martin Storsjö
ed307e2659 rdt: Check the return value of avformat_open
If it failed, return NULL. This avoids trying to use an
half-initialized RDTDemuxContext.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 11:23:57 +02:00
Martin Storsjö
4b3dc857e4 rtsp: Discard the dynamic handler, if it has an alloc function which failed
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-07 11:23:56 +02:00
Michael Niedermayer
728e6d979b avio: print a warning from ffurl_alloc() if no protocols are allocated.
Fixes Ticket618

Based on code by teratorn
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 04:24:49 +01:00
Michael Niedermayer
13b7781ec8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  x86inc: use sse versions of common macros instead of sse2 when applicable
  doc/APIchanges: add missing dates and hashes
  lavf: don't return from void av_update_cur_dts()
  Changelog: add more entries.
  Changelog: update ffmpeg/avconv incompatibility list.
  avconv: remove some redundant temporary variables.
  avconv: fix broken indentation
  avconv: move copy_initial_nonkeyframes to the options context.
  avconv: use file:stream instead of file.stream in log messages.
  doc/avconv: elaborate on basic functionality.
  doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats
  openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
  Call avformat_network_init/deinit in the programs
  Remove leftover includes of strings.h
  avutil: Don't allow using strcasecmp/strncasecmp
  Replace all usage of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of strcasecmp/strncasecmp
  avstring: Add locale independent implementations of toupper/tolower
  cosmetics: insert some spaces in explicit enum value assignments
  move 8SVX audio codecs to the audio codec list part on the next bump
  ...

Conflicts:
	avprobe.c
	doc/APIchanges
	ffplay.c
	ffserver.c
	libavcodec/avcodec.h
	libavdevice/bktr.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavformat/matroskaenc.c
	libavformat/wtv.c
	libavutil/avstring.c
	libavutil/avstring.h
	libavutil/avutil.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-07 03:01:43 +01:00
Anton Khirnov
eb0de71058 lavf: don't return from void av_update_cur_dts() 2011-11-06 19:13:28 +01:00
Martin Storsjö
2461284630 openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
Since 1.0.0, this function is deprecated. A new function,
CRYPTO_THREADID_set_callback is available, but if not set at all,
it uses the address of errno as thread id, which should be
sufficient for most systems.

On windows, it never was necessary to use this function even
before 1.0.0, it used the right win32 API function for this
by default.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 18:31:44 +02:00
Martin Storsjö
3607ed70d5 Remove leftover includes of strings.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:53:05 +02:00
Reimar Döffinger
bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Peter Ross
b372723f6a wtvenc: ensure fat tables are padded to the sector boundary
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-06 02:40:31 +01:00
Stefano Sabatini
41ab24bad8 lavf: remove commented check in compute_pkt_fields2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-06 02:40:31 +01:00
Michael Niedermayer
d8cab5c26b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  http: Remove the custom function for disabling chunked posts
  rtsp: Disable chunked http post through AVOptions
  movdec: Set frame_size for AMR
  h264_weight: remove duplication functions.
  swscale: align vertical filtersize by 2 on x86.
  libavfilter: reindent.
  matroskadec: empty blocks are in fact valid.
  avfilter: don't abort() on zero-size allocations.
  h264: improve calculation of codec delay.
  movenc: Set a correct packet size for AMR-NB mode 15, "no data"
  avformat: Add functions for doing global network initialization
  avformat: Add the https protocol
  avformat: Add the tls protocol, using OpenSSL or gnutls
  avformat: Initialize gnutls in ff_tls_init()
  w32threads: Wrap the mutex functions in inline functions returning int
  configure: Allow linking to the gnutls library
  avformat: Add ff_tls_init()/deinit() that initialize OpenSSL
  configure: Allow linking to openssl
  avcodec: Allow locking and unlocking an avformat specific mutex
  avformat: Split out functions from network.h to a new file, network.c

Conflicts:
	Changelog
	configure
	doc/APIchanges
	libavcodec/internal.h
	libavcodec/version.h
	libavfilter/formats.c
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-06 02:23:34 +01:00
Peter Ross
3b4798a873 wtvdec: ignore another known guid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-06 01:53:46 +01:00
Michael Niedermayer
ea83b032af matroskaenc: base default duration on avg_frame_rate if possible.
Fixed Ticket432

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-06 00:10:28 +01:00
Peter Ross
42b5a6f634 wtvenc: use ff_put_guid and remove local copy of this function
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-05 16:51:26 +01:00
Peter Ross
b7c9512fca asfenc: rename put_guid to ff_put_guid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-05 16:51:25 +01:00
Peter Ross
1efe4ff91d wtvenc: add @file comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-05 16:51:25 +01:00
Peter Ross
3852c29fd4 fix whitespace nits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-05 16:51:25 +01:00
Martin Storsjö
18ae362640 http: Remove the custom function for disabling chunked posts
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 16:54:39 +02:00
Martin Storsjö
d450cc4f4a rtsp: Disable chunked http post through AVOptions
This avoids having to use a private function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 16:53:58 +02:00
Carl Eugen Hoyos
237f13290b movdec: Set frame_size for AMR
Earlier, sc->samples_per_frame was used for setting the frame size,
but all files don't have that set properly. The frame size is a
known constant for these codecs.

If frame_size isn't set, the mov/3gp muxer refuses to mux it.

This fixes stream copy of audio from
https://roundup.libav.org/file1248/Video_With_AMR-NB_Audio.3gp
to another 3gp file (roundup issue 2468).

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 16:30:18 +02:00
Clément Bœsch
0e5ecd806e Replace remaining av_new_stream() with avformat_new_stream(). 2011-11-05 15:07:19 +01:00
Ronald S. Bultje
d31fb1a9e7 matroskadec: empty blocks are in fact valid. 2011-11-05 06:59:27 -07:00
Carl Eugen Hoyos
ed669c9bec movenc: Set a correct packet size for AMR-NB mode 15, "no data"
These packets are valid packets, and consist of 1 byte (which
contains the mode bits).

This had been analyzed and reported by Igor Levin, igor d levin comverse com.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:35:34 +02:00
Martin Storsjö
b6d08f40aa avformat: Add functions for doing global network initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:17:51 +02:00