Commit Graph

924 Commits

Author SHA1 Message Date
Stefano Sabatini
12bcfe05b4 lavf: fix function name in compute_pkt_fields2 av_dlog message 2011-03-18 17:21:48 +01:00
Michael Niedermayer
e528cdac8a Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"
This reverts commit 29ba091136.
2011-03-17 17:26:45 +01:00
Michael Niedermayer
0cb88628fb Revert "use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*"
This reverts commit a03be6e1ba.
2011-03-17 17:26:45 +01:00
Michael Niedermayer
0fecf2642b Merge remote-tracking branch 'newdev/master'
Conflicts:
	Changelog
	doc/APIchanges
	doc/optimization.txt
	libavformat/avio.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 17:22:52 +01:00
Martin Storsjö
f1f60f5252 lavf: Make make_absolute_url a lavf internal function
This is shared by both applehttp demuxer and protocol.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-17 12:28:37 +01:00
Stefano Sabatini
68d875addc lavf: make av_interleave_packet() return meaningful error codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c5dcb3d493)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-17 07:30:09 +01:00
Stefano Sabatini
70abc32314 lavf: enable av_dlog message in av_interleaved_write_frame()
Help debugging timestamp issues.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d541c8b468)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-17 07:29:57 +01:00
Stefano Sabatini
79f43a8cb6 lavf: enable av_dlog() in compute_pkt_fields2()
Turns a comment into an av_dlog() instruction, also add a commented
issues.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 77f21ce464)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-03-17 07:29:47 +01:00
Anton Khirnov
59f65d9579 avio: make url_setbufsize internal.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:38 -04:00
Stefano Sabatini
c5dcb3d493 lavf: make av_interleave_packet() return meaningful error codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 01:35:08 +01:00
Stefano Sabatini
77f21ce464 lavf: enable av_dlog() in compute_pkt_fields2()
Turns a comment into an av_dlog() instruction, also add a commented
issues.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 01:35:08 +01:00
Stefano Sabatini
d541c8b468 lavf: enable av_dlog message in av_interleaved_write_frame()
Help debugging timestamp issues.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 01:35:08 +01:00
Janne Grunau
a03be6e1ba use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_* 2011-03-16 21:54:39 +01:00
Janne Grunau
29ba091136 replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION
also update the multiple inclusion guards in config.h|mak
2011-03-16 21:54:39 +01:00
Michael Niedermayer
6947b0c42e Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 16:48:42 +01:00
Nicolas George
c76374c6db Use AVERROR_EXIT with url_interrupt_cb.
Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR(EINTR) was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be
restarted.

This fixes roundup issues 2657 and 2659 (ffplay not exiting for streamed
content).

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:09:19 -04:00
Anton Khirnov
75b9ed04b9 lavf/utils: dont't explicitly check AVIOContext.error
The error should be caught in write_packet()/write_trailer()

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:10 -04:00
Marton Balint
5126a8ecbb Fix av_find_best_stream when providing a wanted stream
In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.

This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-11 13:05:46 +01:00
Marton Balint
fa14610df5 Fix av_find_best_stream when decoder_ret is given and using a related stream
Yet another fix for the code originally designed for use without related_stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-11 13:03:43 +01:00
Anton Khirnov
f8bc86d47e avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h
also change its prefix to ffio

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit f1ef2cd9ed)
2011-03-08 02:09:34 +01:00
Anton Khirnov
db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Anton Khirnov
f1ef2cd9ed avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h
also change its prefix to ffio

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 12:25:36 -05:00
Anton Khirnov
76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov
384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Martin Storsjö
08ad81cbff libavformat: Add av_pkt_dump{, _log}2, taking an AVStream parameter
This removes a fixme issue, by allowing the av_pkt_dump functions
to use the correct time base.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 863c471638)
2011-03-03 14:15:10 +01:00
Anton Khirnov
f59d8ff8cd avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8)
2011-03-03 14:15:03 +01:00
Martin Storsjö
863c471638 libavformat: Add av_pkt_dump{, _log}2, taking an AVStream parameter
This removes a fixme issue, by allowing the av_pkt_dump functions
to use the correct time base.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-02 11:29:38 +01:00
Anton Khirnov
6b4aa5dac8 avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:12:33 -05:00
Anton Khirnov
ebb92e0768 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 22a3212e32)
2011-02-23 18:22:03 +01:00
Anton Khirnov
22a3212e32 avio: rename url_fopen/fclose -> avio_open/close.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-23 10:18:55 -05:00
Anton Khirnov
e63a362857 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83)
2011-02-22 02:44:37 +01:00
Anton Khirnov
b7effd4e83 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 11:23:22 -05:00
Anton Khirnov
471fe57e1a avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1fd)
2011-02-20 19:05:47 +01:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Anton Khirnov
1b98107c8d Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit ab0287fcbd)
2011-02-18 19:52:33 +01:00
Stefano Sabatini
40c3fe2c08 Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f6c7375a17)
2011-02-18 19:52:30 +01:00
Anton Khirnov
0ebf475494 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 610219a598)
2011-02-18 19:52:28 +01:00
Anton Khirnov
ab0287fcbd Move find_info_tag to lavu and add av_ prefix to it
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-17 15:35:18 +01:00
Stefano Sabatini
f6c7375a17 Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Anton Khirnov
610219a598 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Balint Marton
33af787d8a Fix av_find_best_stream when using a program
The current implementation has a bug, it is returning the stream index
in the found program, and not the stream index in the list of all
streams. The attached patch fixes this issue.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 22ec6b738f)
2011-02-16 23:00:50 +01:00
Reinhard Tartler
7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Balint Marton
22ec6b738f Fix av_find_best_stream when using a program
The current implementation has a bug, it is returning the stream index
in the found program, and not the stream index in the list of all
streams. The attached patch fixes this issue.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 11:47:42 +00:00
Anssi Hannula
2ea7e1f011 lavf: add AV_DISPOSITION_CLEAN_EFFECTS flag
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 24a83bd10a)
2011-02-15 16:32:31 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Michael Niedermayer
e24c05cd53 Better threshold for the gcd based r_frame_rate calculation.
Fixes Gilmore Girls_Net 5_2011_01_08_16_10_53.wtv and RTL GP- WK Superbike - Qatar_RTL7_2009_03_14_15_49_23.wtv.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-02-15 04:19:31 +01:00
Anssi Hannula
24a83bd10a lavf: add AV_DISPOSITION_CLEAN_EFFECTS flag
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:16:32 +00:00
Anssi Hannula
709946b34c lavf: print stream disposition in dump_stream_format
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 3c33c0e263)
2011-02-14 23:58:19 +01:00
Anssi Hannula
3c33c0e263 lavf: print stream disposition in dump_stream_format
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-13 15:21:11 +01:00
Peter Ross
d43d2197c2 make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 5209149157)
2011-02-11 02:54:10 +01:00
Alexander Strange
b38f008ea6 Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-11 02:53:58 +01:00
Peter Ross
5209149157 make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-10 22:55:17 +01:00
Alexander Strange
37b00b47cb Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Anssi Hannula
070e5ba560 lavf: rename ff_probe_input_buffer to make it public
It is useful for applications that hand input data directly to lavf via
a ByteIOContext.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 3940caad02)
2011-02-09 03:33:55 +01:00
Anssi Hannula
e74c01db7e lavf: simplify pb parameter of ff_probe_input_buffer
There is no need to pass the ByteIOContext via a pointer to a pointer
anymore.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit aad216fd7e)
2011-02-09 03:33:55 +01:00
Reimar Döffinger
2f35beae4d Make av_set_pts_info keep previous time base if new one is invalid.
Fixes issue 2475.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b3190529df)
2011-02-09 03:31:17 +01:00
Anssi Hannula
3940caad02 lavf: rename ff_probe_input_buffer to make it public
It is useful for applications that hand input data directly to lavf via
a ByteIOContext.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-08 18:25:12 -05:00
Anssi Hannula
aad216fd7e lavf: simplify pb parameter of ff_probe_input_buffer
There is no need to pass the ByteIOContext via a pointer to a pointer
anymore.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-08 18:25:11 -05:00
Reimar Döffinger
b3190529df Make av_set_pts_info keep previous time base if new one is invalid.
Fixes issue 2475.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 16:12:15 -05:00
Martin Storsjö
4ed68fdfdc libavformat: Add a function for freeing an AVFormatContext
This function is useful for freeing data structures allocated by
muxers, which currently have to be freed manually by the caller.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit f124b087ee)
2011-02-06 20:31:44 +01:00
Peter Ross
2d9fd1810b add ff_index_search_timestamp and ff_add_index_entry
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e6fb5a4f78)
2011-02-06 20:31:42 +01:00
Martin Storsjö
f124b087ee libavformat: Add a function for freeing an AVFormatContext
This function is useful for freeing data structures allocated by
muxers, which currently have to be freed manually by the caller.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-04 11:29:41 -05:00
Peter Ross
e6fb5a4f78 add ff_index_search_timestamp and ff_add_index_entry
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-03 21:50:54 -05:00
Diego Elio Pettenò
d20d1449e0 Make ff_interleave_compare_dts static to utils.c.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 101e1f6ff9)
2011-01-26 03:43:31 +01:00
Diego Elio Pettenò
101e1f6ff9 Make ff_interleave_compare_dts static to utils.c.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Stefano Sabatini
440d761e40 Clarify timestamps related error messages in compute_pkt_fields2().
Originally committed as revision 26308 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-11 12:17:27 +00:00
Daniel Kang
6cbce63650 Fix assertion fail on audio files with invalid sample rates,
fixes issue 2475.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26240 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 03:30:19 +00:00
Stefano Sabatini
6bbdba08c2 Revert previous commit, as it was not meant to be pushed.
Originally committed as revision 26239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 01:11:57 +00:00
Stefano Sabatini
7820147e6f Issue more explicit error messages in compute_pkt_fields2().
Originally committed as revision 26238 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 01:01:21 +00:00
Stefano Sabatini
81bd411965 In av_close_input_stream(), flush the packet queue before to actually
close the stream.

This way the flushed packets can still reference the still unclosed
format context.

In particular this fixes a spurious error issued when closing the
video4linux2 buffer in mmap_release_buffer(), which tries to access
the file descriptor of an already closed file.

Originally committed as revision 26237 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-06 01:01:14 +00:00
Anssi Hannula
cf99e4aa00 Add AVOption support for muxers.
Patch by Anssi Hannula, anssi d hannula a iki d fi

Originally committed as revision 26195 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-02 10:52:34 +00:00
Nicolas George
9128ae08b3 Implement av_find_best_stream.
Originally committed as revision 26104 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 09:08:20 +00:00
Anton Khirnov
bb62d5c1f0 Allow output formats without any streams.
Required for future metadata format.

Originally committed as revision 26100 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 07:46:44 +00:00
Peter Ross
141de5a9c1 add ff_find_stream_index
Originally committed as revision 26092 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 01:24:51 +00:00
David Czech
9100d4d632 Fix crash if invalid bit-rate was read from file.
Fixes issue 2426.

Patch by David Czech, davidczech510 gmail

Originally committed as revision 26061 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-20 09:58:27 +00:00
Aurelien Jacobs
118ccae030 add subtitle codec autodetection
Originally committed as revision 25884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-04 14:46:13 +00:00
Baptiste Coudurier
581ba2cee1 In av_find_stream_info, decode more h264 to get correct delay, issue #2020
Originally committed as revision 25824 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-25 02:19:03 +00:00
Reimar Döffinger
6bfc268305 Add av_append_packet function, to be used in code that merges packets
to allow palette handling without using PaletteControl.

Originally committed as revision 25777 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-21 10:24:48 +00:00
Aurelien Jacobs
b3c0fc7673 av_find_stream_info(): set subtitle codec time_base
Originally committed as revision 25758 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-16 23:50:18 +00:00
Aurelien Jacobs
cb2c971d91 allow passing subtitles header between decoder and encoder
Originally committed as revision 25745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 13:57:49 +00:00
Anton Khirnov
273231466c lavf/utils: use av_{i/o}format_next() instead of first_{i/o}format
Originally committed as revision 25738 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 08:55:15 +00:00
Stefano Sabatini
5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Anton Khirnov
d60a9f52eb lavf: simplify setting the encoder ident tag.
patch by Anton Khirnov  anton _at_ khirnov _dot_ net

Originally committed as revision 25504 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 13:07:20 +00:00
Aurelien Jacobs
13728334e8 add FF_API_SYMVER define to disable symver compatibility functions
Originally committed as revision 25491 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 18:25:01 +00:00
Aurelien Jacobs
114c9a5925 add FF_API_FIRST_FORMAT define to drop deprecated first_?format from public api
Originally committed as revision 25489 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 14:25:36 +00:00
Aurelien Jacobs
d87a521cde add FF_API_PARSE_FRAME_PARAM define to disable the deprecated
parse_image_size() and parse_frame_rate() public functions

Originally committed as revision 25485 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 13:33:23 +00:00
Aurelien Jacobs
88e44314ea add FF_API_URL_SPLIT define to disable the deprecated ff_url_split() function
Originally committed as revision 25482 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 12:54:12 +00:00
Aurelien Jacobs
198ac67fe8 add FF_API_GUESS_FORMAT define to disable the deprecated guess_format()
and guess_stream_format() public functions

Originally committed as revision 25480 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 12:45:14 +00:00
Aurelien Jacobs
fd0368e7ca move av_find_stream_info() info struct to AVStream to avoid messy (re)allocation
Originally committed as revision 25418 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-08 22:01:19 +00:00
Aurelien Jacobs
e99179de9b remove useless local variable
Originally committed as revision 25394 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-07 19:10:51 +00:00
Aurelien Jacobs
3e4318bf4a remove useless local allocated start_time array
Originally committed as revision 25393 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-07 19:05:31 +00:00
Aurelien Jacobs
61138c43e0 properly check for FF_API_MAX_STREAMS instead of LIBAVFORMAT_VERSION_MAJOR
Originally committed as revision 25382 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 21:43:46 +00:00
Aurelien Jacobs
38aab35f47 add new streams API without MAX_STREAMS limit
(disabled until next major bump)

Originally committed as revision 25381 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 20:56:14 +00:00
Aurelien Jacobs
feb2440c38 dynamically use nb_streams instead of static use of MAX_STREAMS
Originally committed as revision 25380 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 20:52:26 +00:00
Reimar Döffinger
6612d8cf31 Move handling of ID3v2 to common utils.c code, reducing code duplication
and supporting it for more formats, fixing issue 2258.

Originally committed as revision 25378 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 20:21:07 +00:00
Martin Storsjö
eb99f179fa find_info_tag: Make sure the output buffer is null terminated
Originally committed as revision 25353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 19:33:56 +00:00
Benjamin Larsson
62784e3733 Add the CODEC_CAP_CHANNEL_CONF capability code and add
that flag to the dca codec. This capability when set
will make sure the codec will initialize the channel
configuration instead of trusting the container. This
fixes issue 2137 and issue 850.

Originally committed as revision 25320 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 22:18:02 +00:00
Michael Chinen
59cb40b921 Fix index_entries pos:
It was being set wrong for files with data_offset > 0

Patch by Michael Chinen, mchinen gmail

Originally committed as revision 25239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 22:17:58 +00:00
Michael Niedermayer
6ed040408b Move AVOptions from libavcodec to libavutil
Originally committed as revision 25210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 14:25:22 +00:00
Christian d'Heureuse
b163078fe3 Fix formatting for negative start times (issue 2139).
Patch by Christian d'Heureuse, chdh inventec ch

Originally committed as revision 25063 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:06:21 +00:00
Aurelien Jacobs
b004207df4 move stream info arrays into a struct to ease future dynamic allocation
Originally committed as revision 25045 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-05 22:25:45 +00:00
Måns Rullgård
668338c573 avformat: free decryption key in av_close_input_stream()
Originally committed as revision 24899 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 15:08:53 +00:00
Martin Storsjö
f9c399c4fd Make parse_key_value from httpauth a common lavf internal function
Originally committed as revision 24832 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-19 14:49:53 +00:00
Aurelien Jacobs
54036be11a rename LAVF_API_* defines to FF_API_* to clarify that it is not public API
Originally committed as revision 24825 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-18 20:34:31 +00:00
Aurelien Jacobs
dd872bf49f add LAVF_API_OLD_METADATA define to disable the deprecated metadata API
Originally committed as revision 24818 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 20:23:19 +00:00
Baptiste Coudurier
d2064fd42b Fix segv when stream copy and validate_tag fails, st->codec->codec is not set
Originally committed as revision 24782 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 00:35:19 +00:00
Przemysław Sobala
ec973f45a3 Fix mem leak when trying to open a non-existing image file (issue 2126).
Patch by Przemysław Sobala, psobala wp-sa pl

Originally committed as revision 24757 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-10 17:27:22 +00:00
Martin Storsjö
311baee795 Make hex_to_data a lavf internal function
This is useful for other future RTP depacketizers

Originally committed as revision 24747 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-09 10:05:33 +00:00
Stefano Sabatini
126b638ea0 Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 23:12:28 +00:00
Baptiste Coudurier
9d3fdf2031 Move AVStream->codec_info_nb_frames increment after try_decode_frame
Originally committed as revision 24017 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-03 03:15:37 +00:00
Baptiste Coudurier
ae447836af In av_find_stream_info, decode at least 4 h.264 frames to be able to guess delay.
Originally committed as revision 24014 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-03 03:07:33 +00:00
XBMC
b0a18c2f0a Make "invalid dts/pts combination" a debug instead of a warning message.
Patch by XBMC

Originally committed as revision 23919 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 23:01:44 +00:00
Måns Rullgård
49bd8e4b84 Fix grammar errors in documentation
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 15:38:06 +00:00
Eli Friedman
22d78b05b1 Fix an "assignment from incompatible pointer type" warning in av_read_frame_internal
Patch by Eli Friedman, eli dot friedman at gmail

Originally committed as revision 23842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-28 08:04:52 +00:00
Måns Rullgård
f3bfe388b5 Make ff_url_split() public
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.

Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 14:16:46 +00:00
Stephen Dredge
5be5d28ced Fix failure in av_read_frame on timestamp rollover.
Patch by Stephen Dredge, sdredge A tpg com au

Originally committed as revision 23699 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-22 08:48:28 +00:00
Martin Storsjö
a955fc5ee7 ff_url_join: Don't add any at-char if the auth is an empty string
Originally committed as revision 23650 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-19 21:56:50 +00:00
Måns Rullgård
b462d13262 Add compatibility wrappers for functions moved from lavf to lavc
When symbol versioning is enabled, moving symbols from one library to
another breaks binary compatibility.  This adds wrappers with the old
version tag for the av_*packet functions recently moved to lavc.

Originally committed as revision 23611 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-15 13:26:52 +00:00
Michael Niedermayer
7686ab07ac Fix muxing rgb rawvideo in avi regression.
Originally committed as revision 23500 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-05 23:13:52 +00:00
Stefano Sabatini
b603ab8dc1 Make the error message issued in case of invalid codec tag more
informative.

Originally committed as revision 23423 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-02 10:54:53 +00:00
Michael Niedermayer
b742a12ee2 Print an error when MAX_STREAMS is reached.
Originally committed as revision 23413 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-01 19:49:21 +00:00
Michael Niedermayer
a5266a4789 Make sure that when the parser is feeded with frame==packet that the
packets are passed through and wont be marked as static which would
require them to be copied by av_dup_packet().

Originally committed as revision 23352 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-27 17:11:37 +00:00
Alex Converse
74a6df59e3 Add an AVSTREAM_PARSE_FULL_ONCE parsing mode to parse headers and combine packets once and only once.
Originally committed as revision 23332 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-26 04:20:32 +00:00
Jai Menon
9bbe9a0dc1 Display a more descriptive log message when probe buffer limit is
reached.

Originally committed as revision 23288 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-24 16:42:16 +00:00
Stefano Sabatini
e1745e2f6e Make av_write_header() return AVERROR(EINVAL) rather than -1 if the
input parameters are not valid.

Originally committed as revision 23253 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-22 21:52:06 +00:00
Stefano Sabatini
cf5b33d9fa Store in a dedicated array the format name - codec id - codec type
mapping. Simplify.

Originally committed as revision 23252 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-22 21:52:02 +00:00
Stefano Sabatini
83c2707908 Prefer enum CodecID over int in ff_codec_get_tag().
Originally committed as revision 23249 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-22 15:56:49 +00:00
Martin Storsjö
9a76125069 Add a libavformat internal function ff_write_chained
Originally committed as revision 23207 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-21 07:07:57 +00:00
Francesco Lavra
698f4cc7f0 Validate AVCodecTag vs CodecID.
Patch by Francesco Lavra, francescolavra interfree it

Originally committed as revision 23159 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-18 19:23:29 +00:00
Francesco Lavra
603a5f04b2 Factorize some code into the new function ff_toupper4().
Patch by Francesco Lavra, francescolavra interfree it

Originally committed as revision 23158 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-18 19:16:40 +00:00
Baptiste Coudurier
58edb075f0 Change MAX_READ_SIZE message during av_find_stream_info to DEBUG level.
It is not harmful and it scares too many users.

Originally committed as revision 23139 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-14 22:04:39 +00:00
Reimar Döffinger
8e2ee182fa Export av_probe_input_format2.
Originally committed as revision 23002 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-01 13:49:35 +00:00
Stefano Sabatini
2ef6c1242a Mark av_metadata_set() as deprecated, and use av_metadata_set2()
in its place.

av_metadata_set() is going to be dropped at the next major bump.

Originally committed as revision 22961 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-25 14:27:42 +00:00
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
2010-04-20 14:45:34 +00:00
Jean-Daniel Dupas
2898526d6a Do not probe when the format is known.
Patch by Jean-Daniel Dupas devlists shadowlab org

Originally committed as revision 22870 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-13 07:25:50 +00:00
Michael Niedermayer
0f1f4816d5 Raise needed score for codec probing in CODEC_ID_PROBE before the last packet.
Fixes issue1871

Originally committed as revision 22831 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-11 00:43:36 +00:00
Michael Niedermayer
497431a5b6 Dont try to compute AVPacket duration for possibly interlaced video codecs
when no parser is available.
This partly fixes the frame rate misdetection in issue1756.

Originally committed as revision 22824 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-09 22:39:39 +00:00
Tomas Härdin
01d91b9be9 Reusing the probe buffer to rewind the ByteIOContext in ff_probe_input_buffer() instead of seeking back to the start of the file. Once exhausted, the size of the buffer is reduced.
Originally committed as revision 22821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-08 09:02:27 +00:00
Michael Niedermayer
0e1f78f90b Fix rounding direction for calculation of AVPacket.duration.
Fixes issue1579

Originally committed as revision 22802 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-04 22:19:42 +00:00
Michael Niedermayer
ccf8c2944c Limit probing to probesize.
Originally committed as revision 22758 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-01 12:09:33 +00:00
Michael Niedermayer
fe8344a276 Add AVFMT_FLAG_NOFILLIN and AVFMT_FLAG_NOPARSE.
Originally committed as revision 22745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 12:55:16 +00:00
Jean-Daniel Dupas
cc947f04cc Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.
Patch by Jean-Daniel Dupas, devlists shadowlab org

Originally committed as revision 22744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 12:29:58 +00:00
Joakim Plate
46da7fa133 Probe aac codecs for CODEC_ID_PROBE.
Patch by Joakim Plate, elupus ecce se

Originally committed as revision 22742 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 10:45:15 +00:00
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
2010-03-30 23:30:55 +00:00
Micah F. Galizia
532aa889eb Fix updating condition for the probe_size variable in the internal
loop of ff_probe_input_buffer(), making sure that probe_size is always
set to probe_max_size in the last iteration.

Also make the function return an error if we get to the max probe
length and still cannot figure out what the format is.

Patch by Micah Galizia micahgalizia A gmail D com.

Originally committed as revision 22688 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-26 01:12:14 +00:00
Martin Storsjö
d8f9295753 Reindent
Originally committed as revision 22666 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 07:14:41 +00:00
Martin Storsjö
ddbeb95447 Add a lowercase parameter to ff_data_to_hex
Originally committed as revision 22665 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 07:13:20 +00:00
Stefano Sabatini
2928b83c75 Make av_open_input_file() return AVERROR_INVALIDDATA rather than
AVERROR_NOFMT if the format is unknown / cannot be recognized.

It is returned AVERROR_INVALIDDATA, in the sense that the data is
invalid within what the specific libav* binary supports.

That was the last remaining use of AVERROR_NOFMT, which is going to be
dropped at the next libavutil major bump.

Originally committed as revision 22625 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-21 16:34:04 +00:00
Måns Rullgård
c7f625eecf Fix erroneous behaviour when format probe hits end of file
If the format probe hits end of file, do not add the error code
to the buffer position.  This is obviously wrong, and with a
small input file would cause a negative buffer overflow.

Fixes issue 1818.

Originally committed as revision 22571 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-16 21:45:30 +00:00
Aurelien Jacobs
972ffe6220 rename av_read_frame_flush to ff_read_frame_flush
it is an internal function, not part of public API

Originally committed as revision 22562 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-15 23:15:24 +00:00
Aurelien Jacobs
588af13fee rename av_program_add_stream_index to ff_program_add_stream_index
it is an internal function, not part of public API

Originally committed as revision 22561 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-15 23:14:07 +00:00
Martin Storsjö
2dad0dcec6 Move the NTP offset definitions to internal.h
Originally committed as revision 22542 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-15 10:36:30 +00:00
Micah F. Galizia
eadd495d06 Move the probe loop from av_open_input_file() into its own method
av_probe_input_buffer() so that it can be reused. Here are a few
differences to the original way things were probed:

- maximum probe buffer size can be specified as a parameter.

- offset within the stream to probe from can be specified as a parameter.

- instead of seeking back to the start each time a probe fails, stream
  data is appended to the reallocated buffer. This lowers the amount
  of data read from the stream (there is no repetition) and results in
  fewer closed and reopened streams (when seeking fails).

New attempt after r22296, which was revert in r22315 due to a FATE
failure.

See the thread:
Subject: [FFmpeg-devel] [PATCH] Move av_open_input_file probe loop to its own method
Date: 2010-03-05 03:23:57 GMT

Patch by Micah F. Galizia printf("%s%s@%s.%s", "micah", "galizia", "gmail", "com").

Originally committed as revision 22532 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-14 22:40:16 +00:00
Martin Storsjö
594a9aebbe Make the ntp_time function available to other parts of libavformat, as ff_ntp_time
Originally committed as revision 22438 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-10 22:21:39 +00:00
Michael Niedermayer
67c10de7d2 Add special case to avoid binary search when appending index entries.
Originally committed as revision 22400 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-09 15:19:23 +00:00
Stefano Sabatini
f4495cdc00 Remove definition of match_ext(), which is declared under #ifdef
HAVE_AV_CONFIG_H and so not publicly declared, and currently unused.

Originally committed as revision 22353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 23:51:53 +00:00
Martin Storsjö
f984dcf6dd Reindent
Originally committed as revision 22322 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 09:05:03 +00:00
Martin Storsjö
c5c6e67c28 Rename url_split to ff_url_split
Since this function isn't in the public API, it should have an ff_ prefix.

Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 09:03:25 +00:00
Måns Rullgård
f19341e17a Revert "Move the probe loop from av_open_input_file() into its own method"
This reverts r22296.  This change made some files to fail to open.
The patch submitter has promised to investigate next week.

Originally committed as revision 22315 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 03:46:37 +00:00
Alex Converse
e7e291e960 av_find_stream_info(): Add a workaround for backwards compatible HE-AAC signaling.
The sample rate, frame size, and channel count from the container are
not reliable when backwards compatible signaling is used.

Originally committed as revision 22301 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 00:00:50 +00:00
Daniel Kristjansson
663322c1b8 Fix pts->dts conversion init for non-zero initial value for pts.
Patch by Daniel Kristjansson, danielk cuymedia net

Originally committed as revision 22297 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-07 23:10:18 +00:00
Micah F. Galizia
4245c6ec4e Move the probe loop from av_open_input_file() into its own method
av_probe_input_buffer() so that it can be reused. Here are a few
differences to the original way things were probed:

- maximum probe buffer size can be specified as a parameter.

- offset within the stream to probe from can be specified as a parameter.

- instead of seeking back to the start each time a probe fails, stream
  data is appended to the reallocated buffer. This lowers the amount
  of data read from the stream (there is no repetition) and results in
  fewer closed and reopened streams (when seeking fails).

Patch by Micah F. Galizia printf("%s%s@%s.%s", "micah", "galizia", "gmail", "com").

Originally committed as revision 22296 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-07 22:42:11 +00:00
Måns Rullgård
c26e58e32c Add some missing #includes
Originally committed as revision 22258 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 22:36:36 +00:00
Martin Storsjö
780d7897a9 Add a function ff_url_join for assembling URLs
Originally committed as revision 22225 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-05 22:31:45 +00:00
Vitor Sessak
5301a05d3e Fix memory leak in NUT muxer
Originally committed as revision 22222 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-05 17:26:34 +00:00
Anton Khirnov
82f50f820e Print chapter info in dump_format().
Patch by Anton Khirnov, wyskas gmail

Originally committed as revision 22113 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-28 18:37:09 +00:00
Michael Niedermayer
ab392695d5 Count all frames with codec_info_nb_frames not just ones with non zero
duration. I hope this breaks nothing. Its needed for my fix of issue1156

Originally committed as revision 22001 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 16:29:57 +00:00
Michael Niedermayer
6c6e6ef5e2 Put codec_info_nb_frames back in AVStream and print its value.
This way streams with no or very few frames can be avoided during
auto selection

Originally committed as revision 21998 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 15:07:18 +00:00
Michael Niedermayer
b7884740fa Make sure mp1/mp2 get their frame_size set.
Fixes issue1696

Originally committed as revision 21972 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-22 22:05:20 +00:00
Michael Niedermayer
0e5f33f242 Make sure a set r_frame_rate is not overriden by a guess.
Also make sure we dont waste time in this case with collecting timestamps.

Originally committed as revision 21957 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-22 10:19:46 +00:00
Anton Khirnov
ed7694d8cf Set lavf identification string globally in av_write_header(), rather
than inside the muxers. Remove special handling of "encoder" tags from
AVI and MP3 muxers.

Patch by Anton Khirnov <wyskas gmail com>.

Originally committed as revision 21850 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-16 16:32:25 +00:00
Michael Niedermayer
ab5a0175f5 Add flag so muxers not needing width/height can signal this.
Add this flag to img2 (fixes -vcodec copy to image2 in some cases)

Originally committed as revision 21773 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-12 20:35:29 +00:00
Michael Niedermayer
e6406939a8 Directly use av_rescale_rnd() instead of av_convert_ts() as this cuts the
number of calls to it down by 2.

Originally committed as revision 21676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 19:10:04 +00:00
Michael Niedermayer
e5026c36d4 Use av_compare_ts() for interleaving per dts.
Originally committed as revision 21672 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 16:27:17 +00:00
Michael Niedermayer
8c3b161e9e Dont try generic seek if seek request before first index entry and backward.
Fixes issue1275

Originally committed as revision 21633 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-03 23:59:48 +00:00
Michael Niedermayer
43e4d57f66 Try to open decoders in av_find_stream_info() even if no packets for the
stream are found.
Fixes issue1385

Originally committed as revision 21630 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-03 23:05:58 +00:00
Michael Niedermayer
411ff3225f Increase search range if no end timestamp could be found for the duration
calculation.

Originally committed as revision 21577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 17:43:18 +00:00
Michael Niedermayer
c55806e3a2 Flag to ignore dts on frames that contain pts.
This works around common issues with mpeg-ps files with broken timestamps.
Also allows playing the broken sample from issue1024.

Originally committed as revision 21562 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 22:55:12 +00:00
Michael Niedermayer
d30a8beb99 Fix duration calculation in the presence of a single wraping of the timeline.
Fixes issue1714.

Originally committed as revision 21485 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 19:37:52 +00:00
Baptiste Coudurier
c3aeaa540d set average frame rate in mov demuxer
Originally committed as revision 21310 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:56:04 +00:00
Tomas Härdin
094a63f1f6 Check there is a stream before writing header.
Patch by Tomas Härdin: $(name) punto hardin chez codemill dot se

Originally committed as revision 21186 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 14:32:48 +00:00
Stefano Sabatini
4160069067 Prefer "*FUNC_NAME(" over "* FUNC_NAME(" for XXX_configuration() and
XXX_license() functions, consistent with the rest of FFmpeg.

Originally committed as revision 21005 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-03 14:31:25 +00:00
Stefano Sabatini
aa13b573b4 Use av_match_ext() in place of the deprecated match_ext() function.
Originally committed as revision 21000 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 23:56:09 +00:00
Stefano Sabatini
8eb631fa50 Deprecate match_ext() in favor of av_match_ext(), and mark it for
deletion at the next major bump.

Originally committed as revision 20998 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 23:50:10 +00:00
Stefano Sabatini
0f52ef1a00 Use av_guess_format() in place of the deprecated guess_format().
Originally committed as revision 20994 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 12:58:03 +00:00
Stefano Sabatini
a1f547b94a Deprecate guess_format() in favor of av_guess_format().
Originally committed as revision 20991 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-01 12:46:24 +00:00
Stefano Sabatini
1642ee4337 Deprecate and mark for deletion the function guess_stream_format(),
and clone its code to ffserver_guess_format() in ffserver.c.

guess_stream_format() is hackish since it relies on some undocumented
properties of the name of the muxers (wich is currently only relevant
for the ASF muxer), and has no use outside ffserver.c.

Originally committed as revision 20987 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-31 14:12:58 +00:00
Michael Niedermayer
02483df478 Make sure the Metadata: header is not printed if the only metadata will not
be displayed. (idea from ffmbc)

Originally committed as revision 20850 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 23:39:20 +00:00
Michael Niedermayer
b298daea1a Move dump_metadata() to where it is in ffmbc, looks better.
Originally committed as revision 20849 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 23:34:46 +00:00
Michael Niedermayer
229303d16c indent
Originally committed as revision 20848 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 23:31:01 +00:00
Michael Niedermayer
4d9b678448 Skip dumping language twice.
This looks too ugly. Idea also from ffmbc.

Originally committed as revision 20847 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 23:30:41 +00:00
Michael Niedermayer
2e720e11bc dump metadata for AVStreams & AVPrograms too.
Originally committed as revision 20846 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 23:27:43 +00:00
Michael Niedermayer
8b5e5ec5d7 Factorize dump_metadata() out.
Idea from ffmbc, code not, mine is a fraction of the size due to simpler
metadata API.

Originally committed as revision 20845 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 23:19:24 +00:00
Michael Niedermayer
cc20679a41 Try to simplify av_estimate_timings_from_pts() like in ffmbc.
Note if this breaks for some file, report it please!

Originally committed as revision 20844 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 22:56:59 +00:00
Michael Niedermayer
0e500e0db2 Debug av_log() about stream probing from ffmbc.
Originally committed as revision 20842 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 22:15:51 +00:00
Michael Niedermayer
02b398ef49 Add avg_frame_rate.
Originally committed as revision 20826 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 15:52:11 +00:00
Michael Niedermayer
51ce8c2f87 Remove commented out code.
Originally committed as revision 20823 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-13 15:01:09 +00:00
John Stebbins
106fa129f4 Reset pts_buffers in av_read_frame_flush().
Patch by John Stebbins, jstebbins jetheaddev com

Originally committed as revision 20806 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-12 15:26:33 +00:00
Sean Soria
b593f7fdef Calls to url_fseek should have their return value checked in
av_seek_frame_binary, just as they do in av_seek_frame_generic.
Otherwise, function may return success even though url_fseek reported
failure.

Patch by Sean Soria, first.last at gmail

Originally committed as revision 20744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-06 00:03:53 +00:00
Sean Soria
6659b32ab2 Change ret type to int64_t because url_fseek returns int64_t.
This fixes seeking in files > 2gb.
Patch by Sean Soria, sean dot soria at gmail dot com.

Originally committed as revision 20693 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-01 22:56:44 +00:00
Baptiste Coudurier
66765b5933 use AVFormatContext in av_log, better than AVCodecContext when multiple streams are present
Originally committed as revision 20689 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-01 20:15:05 +00:00
Michael Niedermayer
77ac76a30f Print a warning if the duration is estimated from the bitrate, as this is
likely not accurate.

Originally committed as revision 20675 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-30 22:08:22 +00:00
Diego Biurrun
c173693698 Add functions to return library license and library configuration.
Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-18 17:15:17 +00:00
Diego Biurrun
ca02d8ec97 Add '#undef fprintf' before PRINT macro that uses fprintf.
Otherwise there may be trouble when fprintf is disabled in favor of av_log.

Originally committed as revision 20515 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-11 21:57:50 +00:00
Baptiste Coudurier
050ba6f45e print packet duration when debugging timestamps
Originally committed as revision 20420 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-30 18:17:16 +00:00
Baptiste Coudurier
72017ea1dc check stream index validity in av_program_add_stream_index
Originally committed as revision 20319 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-19 18:55:27 +00:00
Baptiste Coudurier
8425cecacc request mp3 frame_size to be set in has_codec_parameters, fix issue #1314
Originally committed as revision 20318 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-19 18:53:32 +00:00
Baptiste Coudurier
f2c061ec0f reindent after commit
Originally committed as revision 20307 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-19 02:20:08 +00:00
Baptiste Coudurier
7edbcfb79e In dump_format, print streams not associated with any program.
Fixes issue #1366.

Originally committed as revision 20306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-19 02:12:10 +00:00
Baptiste Coudurier
7857d3ccf6 fix indentation and add braces
Originally committed as revision 20289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-18 20:25:48 +00:00
Vitor Sessak
a4cb675124 Avoid segfault for empty input files
Originally committed as revision 20265 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-17 20:37:58 +00:00
Carl Eugen Hoyos
b8c0db9981 Allow autodetection of E-AC3.
Originally committed as revision 20206 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-11 11:56:53 +00:00
Carl Eugen Hoyos
e18027ac40 Add FIXME about low_delay vs has_b_frames.
Originally committed as revision 20161 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-03 19:40:52 +00:00
Wallak
f4a4be3f4e H264 allows B frames without requiring a >=1 sized buffer.
Patch by wallak, wallak free fr

Originally committed as revision 20160 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-03 19:30:09 +00:00
Michael Niedermayer
e9b0681610 Only use *ic_ptr when it has been initialized.
Originally committed as revision 19911 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-18 13:19:13 +00:00
Baptiste Coudurier
db46c4e14d print at debug level the score at which codec probing succedeed
Originally committed as revision 19899 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-17 18:46:50 +00:00
Michael Niedermayer
1bc8c36125 Print a warning if a format has been detected with a low score.
Originally committed as revision 19890 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 20:44:26 +00:00
Michael Niedermayer
c36823fd3d Print at debug level the score with which probing succeeded.
Originally committed as revision 19889 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 20:23:04 +00:00
Michael Niedermayer
8a6c7a5286 Fix indention after last commit.
Originally committed as revision 19888 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 20:06:48 +00:00
Michael Niedermayer
e07b882b4d Improve amortized worst case speed of the muxers packet interleaving code
from O(packets_in_the_file) to O(num_of_streams).

Originally committed as revision 19887 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 20:04:04 +00:00
Michael Niedermayer
657eca1f8b Upgrade a few important messages to AV_LOG_WARNING.
Originally committed as revision 19872 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 01:47:54 +00:00
Michael Niedermayer
0355537605 Fix indention after previous commit.
Originally committed as revision 19871 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 01:17:39 +00:00
Michael Niedermayer
ddce56efc5 Make packet interleaving in the muxer not scan through the whole
buffer when simply appending at the end works.
Much faster if one stream ends prematurely.
Fixes issue1379.

Originally committed as revision 19870 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 00:59:15 +00:00
Michael Niedermayer
42831b46ef Also reset *_end in flush_packet_queue().
Originally committed as revision 19869 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-16 00:56:31 +00:00
Justin Ruggles
1d07029fea Add frame_size as a codec parameter requirement for Speex in
av_find_stream_info().  It forces decoding of a packet when there is no
Speex header in order to determine the correct frame size.

Originally committed as revision 19760 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-04 21:38:45 +00:00
Ivan Schreter
101036adb9 Support for generic multi-stream key frame finding for new seek API.
Originally committed as revision 19680 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-22 16:05:43 +00:00
Peter Ross
c0b88f1920 Moves the display of metadata to dump_format()
Originally committed as revision 19632 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-12 13:17:39 +00:00
Art Clarke
ebb82604b0 Only free '*ic_ptr' when a caller has pre-allocated a context and passed it in
(wherein av_open_input_file assumes memory ownership).
Patch by Art Clarke a<surname> xuggle com

Originally committed as revision 19436 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-15 10:00:16 +00:00
Art Clarke
56c6cf287b Fix mem leak when user preallocates an AVFormatContext, passes it to
av_open_input_file(), but the file does not exist.
Patch by Art Clarke a$(surname) xuggle com

Originally committed as revision 19370 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-08 08:26:57 +00:00
Michael Niedermayer
e7e5d1e990 If either of num or den is 0 make both 0 in av_set_pts_info().
Originally committed as revision 19326 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-02 12:47:58 +00:00
Michael Niedermayer
d218a86a0d Make sure av_set_pts_info() does not set the fields of a timebase to
negative values.

Originally committed as revision 19325 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-01 20:52:48 +00:00
Michael Niedermayer
dec14949a6 Make arguments of av_set_pts_info() unsigned.
Fixes issue1240/mpeg1/smclockmpeg1.avi.3.1

Originally committed as revision 19319 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-01 18:50:31 +00:00
Baptiste Coudurier
57011a13d6 use AVFormatContext->probesize in av_find_stream_info and raise default to 5M
Originally committed as revision 19274 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-25 19:10:27 +00:00
Baptiste Coudurier
af122d6a80 limit raw packet buffer size used for codec probing
Originally committed as revision 19272 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-25 18:48:57 +00:00
Daniel Verkamp
1a40491ef2 Add ff_ prefixes to exported symbols in libavformat/riff.h.
patch by Daniel Verkamp, aniel drv nu

Originally committed as revision 19254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-22 23:09:34 +00:00
Michael Niedermayer
71ee651559 Print why av_find_stream_info() failed, this is a rather common question
during debugging ...

Originally committed as revision 19217 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-18 00:22:08 +00:00
Baptiste Coudurier
818062f2f3 if b frames are parsed, set codec->has_b_frames
Originally committed as revision 19147 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-11 04:30:05 +00:00
Baptiste Coudurier
e695906ec7 use dts codec probing
Originally committed as revision 19014 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-31 04:13:25 +00:00
Baptiste Coudurier
86cb7e33cc fix codec probing, stop after MAX_PROBE_PACKETS and return all packets
Originally committed as revision 19000 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-31 00:24:06 +00:00
Baptiste Coudurier
db5dc02bd7 cast size to int64_t to avoid overflow
Originally committed as revision 18991 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-30 04:08:43 +00:00
Baptiste Coudurier
1bd280f730 Set frame defaults in try_decode_frame.
Fix:
==22211== Conditional jump or move depends on uninitialised value(s)
==22211==    at 0x811E692: ff_print_debug_info (mpegvideo.c:1137)
==22211==    by 0x82E6A7B: decode_frame (h264.c:7897)
==22211==    by 0x80F2823: avcodec_decode_video2 (utils.c:564)
[...]
==22211==  Uninitialised value was created by a stack allocation
==22211==    at 0x8064AA3: try_decode_frame (utils.c:1845)

Originally committed as revision 18483 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 03:38:55 +00:00
Baptiste Coudurier
e472ea34c4 reindent
Originally committed as revision 18480 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 03:32:02 +00:00
Reimar Döffinger
d2e63e8b05 Simplify packet duplication code in ff_interleave_add_packet.
Behaviour only changes if pkt->destuct neither av_destruct_packet,
av_destruct_packet_nofree nor NULL, in which case the new code avoids a double free.

Originally committed as revision 18452 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-11 22:38:00 +00:00
Reimar Döffinger
80d403fc19 Get rid of av_destruct_packet_nofree and use NULL instead.
It is still used in comparisons to keep ABI compatibility.

Originally committed as revision 18431 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-11 12:42:29 +00:00
Thilo Borgmann
655d47c2cb Make try_decode_frame() use the new avcodec_decode_* API.
Patch by Thilo Borgmann thilo.borgmann AT g00glemail dot com.

Originally committed as revision 18408 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-10 11:03:06 +00:00
Reimar Döffinger
feb993e579 Add av_shrink_packet function for use in av_get_packet that reduces pkt->size
and ensures the following padding is correctly initialized to 0.

Originally committed as revision 18378 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-08 20:19:12 +00:00
Thilo Borgmann
cdd8930e6a Move av_packet_*() functions from libavformat/ to libavcodec/, where the
AVPacket structure now resides also.

Patch by Thilo Borgmann thilo.borgmann googlemail com, see the mailinglist
thread "Google Summer of Code participation" for additional discussion.

Originally committed as revision 18353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-07 18:31:14 +00:00
Baptiste Coudurier
3a5601885b move max analyze duration check before considering new packet
Originally committed as revision 18051 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-19 21:54:34 +00:00
Reimar Döffinger
74f5ae847d Add AVFMT_GENERIC_INDEX support also for formats that do not use a parser.
Originally committed as revision 17965 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-14 21:46:00 +00:00