Statistics
| Branch: | Revision:

ffmpeg / libavformat / utils.c @ 512f973e

History | View | Annotate | Download (125 KB)

# Date Author Comment
512f973e 04/03/2011 02:40 PM Michael Niedermayer

Fix issue2437

5b56ad03 04/03/2011 02:40 PM Michael Niedermayer

Reimplement stream probe try #2

Signed-off-by: Michael Niedermayer <>

15957b19 04/03/2011 02:40 PM Michael Niedermayer

Partial rewrite stream probe code.
Fix issue2312.
Signed-off-by: Michael Niedermayer <>

78431098 04/03/2011 01:18 AM Anssi Hannula

lavf: inspect more frames for fps when container time base is coarse

As per issue2629, most 23.976fps matroska H.264 files are incorrectly
detected as 24fps, as the matroska timestamps usually have only
millisecond precision.

Fix that by doubling the amount of timestamps inspected for frame rate...

4defa68f 04/01/2011 11:54 PM Michael Niedermayer

Merge remote branch 'qatar/master'

  • qatar/master:
    ac3enc: ARM optimised ac3_compute_matissa_size
    ac3: armv6 optimised bit_alloc_calc_bap
    fate: simplify fft test rules
    avio: document avio_alloc_context.
    lavf: make compute_chapters_end less picky....
ab11317c 04/01/2011 05:53 PM Anton Khirnov

lavf: make compute_chapters_end less picky.

In particular, now it assumes that
a) chapters are chronologically ordered
b) chapters have the same timebases
c) duration of the stream is known
and asserts if any of these is not met.

Make it properly deal with harsher conditions....

ca1a2a47 03/26/2011 01:41 PM Stefano Sabatini

lavf: make compute_pkt_fields2() return meaningful error values

27ef7b1b 03/26/2011 02:06 AM Michael Niedermayer

Merge remote-tracking branch 'newdev/master'

  • newdev/master:
    mov: set audio service type for AC-3 from bitstream mode in the 'dac3' atom.
    Get audio_service_type for AC-3 based on bitstream mode in the AC-3 parser and decoder, and vice-versa for the AC-3 encoder....
c70a6a41 03/25/2011 08:58 PM Justin Ruggles

Use audio_service_type to set stream disposition.

4fa0e247 03/23/2011 01:42 AM Michael Niedermayer

Merge remote-tracking branch 'newdev/master'

  • newdev/master: (33 commits)
    Fix an infinite loop when RoQ encoded generated a frame with a size greater than the maximum valid size.
    Add kbdwin.o to AC3 decoder
    Detect byte-swapped AC-3 and support decoding it directly....
933e90a6 03/21/2011 06:54 PM Anton Khirnov

avio: make av_url_read_fseek/fpause internal.

Signed-off-by: Ronald S. Bultje <>

2912e87a 03/19/2011 01:33 PM Mans Rullgard

Replace FFmpeg with Libav in licence headers

Signed-off-by: Mans Rullgard <>

12bcfe05 03/18/2011 04:21 PM Stefano Sabatini

lavf: fix function name in compute_pkt_fields2 av_dlog message

e528cdac 03/17/2011 04:26 PM Michael Niedermayer

Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"

This reverts commit 29ba091136a5e04574f7bfc1b17536c923958f6f.

0cb88628 03/17/2011 04:26 PM Michael Niedermayer

Revert "use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*"

This reverts commit a03be6e1ba4cbf9984b0bbdb674704bbb2da6713.

0fecf264 03/17/2011 04:22 PM Michael Niedermayer

Merge remote-tracking branch 'newdev/master'

Conflicts:
Changelog
doc/APIchanges
doc/optimization.txt
libavformat/avio.h

Merged-by: Michael Niedermayer <>

f1f60f52 03/17/2011 11:28 AM Martin Storsjö

lavf: Make make_absolute_url a lavf internal function

This is shared by both applehttp demuxer and protocol.

Signed-off-by: Luca Barbato <>

68d875ad 03/17/2011 06:30 AM Stefano Sabatini

lavf: make av_interleave_packet() return meaningful error codes

Signed-off-by: Michael Niedermayer <>
(cherry picked from commit c5dcb3d493a6bb73efeb8bfae24f5cc31908201f)

Signed-off-by: Reinhard Tartler <>

70abc323 03/17/2011 06:29 AM Stefano Sabatini

lavf: enable av_dlog message in av_interleaved_write_frame()

Help debugging timestamp issues.

Signed-off-by: Michael Niedermayer <>
(cherry picked from commit d541c8b468c12892fe7b7e655e1ed45e11e2166d)

Signed-off-by: Reinhard Tartler <>

79f43a8c 03/17/2011 06:29 AM Stefano Sabatini

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 <>
(cherry picked from commit 77f21ce4641b53f3277ba30ca3d009b6250fd9ea)

Signed-off-by: Reinhard Tartler <>

59f65d95 03/17/2011 02:59 AM Anton Khirnov

avio: make url_setbufsize internal.

Signed-off-by: Ronald S. Bultje <>

c5dcb3d4 03/17/2011 12:35 AM Stefano Sabatini

lavf: make av_interleave_packet() return meaningful error codes

Signed-off-by: Michael Niedermayer <>

77f21ce4 03/17/2011 12:35 AM Stefano Sabatini

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 <>

d541c8b4 03/17/2011 12:35 AM Stefano Sabatini

lavf: enable av_dlog message in av_interleaved_write_frame()

Help debugging timestamp issues.

Signed-off-by: Michael Niedermayer <>

a03be6e1 03/16/2011 08:54 PM Janne Grunau

use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*

29ba0911 03/16/2011 08:54 PM Janne Grunau

replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION

also update the multiple inclusion guards in config.h|mak

6947b0c4 03/15/2011 03:48 PM Michael Niedermayer

Merge remote-tracking branch 'newdev/master'

Merged-by: Michael Niedermayer <>

c76374c6 03/15/2011 12:09 PM Nicolas George

Use AVERROR_EXIT with url_interrupt_cb.

Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be...

75b9ed04 03/15/2011 12:04 PM Anton Khirnov

lavf/utils: dont't explicitly check AVIOContext.error

The error should be caught in write_packet()/write_trailer()

Signed-off-by: Ronald S. Bultje <>

5126a8ec 03/11/2011 12:05 PM Marton Balint

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...

fa14610d 03/11/2011 12:03 PM Marton Balint

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 <>

f8bc86d4 03/08/2011 01:09 AM Anton Khirnov

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 <>
(cherry picked from commit f1ef2cd9ed22be231bb4da8d2f93d9a0c7877aa7)

db44ea96 03/08/2011 01:09 AM Anton Khirnov

avio: avio_ prefix for url_fsize

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit 76aa876e69cf78a40821e66dec0a1006e4eb23ec)

f1ef2cd9 03/07/2011 05:25 PM Anton Khirnov

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 <>

76aa876e 03/07/2011 04:03 PM Anton Khirnov

avio: avio_ prefix for url_fsize

Signed-off-by: Ronald S. Bultje <>

384c9c2f 03/05/2011 01:29 AM Anton Khirnov

avio: add avio_tell macro as a replacement for url_ftell

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit a2704c9712ad35cc22e7e0d8a79b581c07fa383b)

a2704c97 03/04/2011 04:26 PM Anton Khirnov

avio: add avio_tell macro as a replacement for url_ftell

Signed-off-by: Ronald S. Bultje <>

08ad81cb 03/03/2011 01:15 PM Martin Storsjö

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 <>
(cherry picked from commit 863c471638fa667e6e5c5df059b67af263e1cd40)

f59d8ff8 03/03/2011 01:15 PM Anton Khirnov

avio: avio_ prefix for url_fseek

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit 6b4aa5dac8f41aa452d0ce9a1bede9e59a303060)

863c4716 03/02/2011 10:29 AM Martin Storsjö

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 <>

6b4aa5da 03/01/2011 05:12 PM Anton Khirnov

avio: avio_ prefix for url_fseek

Signed-off-by: Ronald S. Bultje <>

ebb92e07 02/23/2011 05:22 PM Anton Khirnov

avio: rename url_fopen/fclose -> avio_open/close.

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit 22a3212e32b696028e21f00871f3cb48c044029d)

22a3212e 02/23/2011 03:18 PM Anton Khirnov

avio: rename url_fopen/fclose -> avio_open/close.

Signed-off-by: Ronald S. Bultje <>

e63a3628 02/22/2011 01:44 AM Anton Khirnov

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...

b7effd4e 02/21/2011 04:23 PM Anton Khirnov

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...

471fe57e 02/20/2011 06:05 PM Anton Khirnov

avio: rename ByteIOContext to AVIOContext.

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit ae628ec1fd7f54c102bf9e667a3edd404b9b9128)

ae628ec1 02/20/2011 01:37 PM Anton Khirnov

avio: rename ByteIOContext to AVIOContext.

Signed-off-by: Ronald S. Bultje <>

1b98107c 02/18/2011 06:52 PM Anton Khirnov

Move find_info_tag to lavu and add av_ prefix to it

Signed-off-by: Janne Grunau <>
(cherry picked from commit ab0287fcbdebc8ff416214535d7ee8424406990e)

40c3fe2c 02/18/2011 06:52 PM Stefano Sabatini

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 <>...

0ebf4754 02/18/2011 06:52 PM Anton Khirnov

lavf: add av_ prefix to dump_format()

Signed-off-by: Mans Rullgard <>
(cherry picked from commit 610219a598095f938705f200dfe3946455ef871a)

ab0287fc 02/17/2011 02:35 PM Anton Khirnov

Move find_info_tag to lavu and add av_ prefix to it

Signed-off-by: Janne Grunau <>

f6c7375a 02/16/2011 11:39 PM Stefano Sabatini

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 <>

610219a5 02/16/2011 11:39 PM Anton Khirnov

lavf: add av_ prefix to dump_format()

Signed-off-by: Mans Rullgard <>

33af787d 02/16/2011 10:00 PM Balint Marton

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 <>...

7ffe76e5 02/16/2011 10:00 PM Reinhard Tartler

Merge libavcore into libavutil

Done to keep ABI compatible. Otherwise this is just silly

22ec6b73 02/16/2011 11:47 AM Balint Marton

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 <>

2ea7e1f0 02/15/2011 03:32 PM Anssi Hannula

lavf: add AV_DISPOSITION_CLEAN_EFFECTS flag

Signed-off-by: Mans Rullgard <>
(cherry picked from commit 24a83bd10a1ed56cadd2c475b839887752f23183)

737eb597 02/15/2011 03:18 PM Reinhard Tartler

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...

e24c05cd 02/15/2011 03:19 AM Michael Niedermayer

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 <>

24a83bd1 02/14/2011 11:16 PM Anssi Hannula

lavf: add AV_DISPOSITION_CLEAN_EFFECTS flag

Signed-off-by: Mans Rullgard <>

709946b3 02/14/2011 10:58 PM Anssi Hannula

lavf: print stream disposition in dump_stream_format

Signed-off-by: Janne Grunau <>
(cherry picked from commit 3c33c0e26325f189dbf7f212f8e9042feb83bfb0)

3c33c0e2 02/13/2011 02:21 PM Anssi Hannula

lavf: print stream disposition in dump_stream_format

Signed-off-by: Janne Grunau <>

d43d2197 02/11/2011 01:54 AM Peter Ross

make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED

Signed-off-by: Janne Grunau <>
(cherry picked from commit 52091491575f015c09a32a745de4f7f7592fe6d4)

b38f008e 02/11/2011 01:53 AM Alexander Strange

Frame-based multithreading framework using pthreads

See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <>

52091491 02/10/2011 09:55 PM Peter Ross

make av_find_best_stream() ignore streams marked with AV_DISPOSITION_*_IMPAIRED

Signed-off-by: Janne Grunau <>

37b00b47 02/09/2011 02:17 PM Alexander Strange

Frame-based multithreading framework using pthreads

See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <>

070e5ba5 02/09/2011 02:33 AM Anssi Hannula

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 <>
(cherry picked from commit 3940caad02fbc4f075e77bc605849b1d84ba1b8e)

e74c01db 02/09/2011 02:33 AM Anssi Hannula

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 <>
(cherry picked from commit aad216fd7e3209fe0a865d8751e680925f6654d3)

2f35beae 02/09/2011 02:31 AM Reimar Döffinger

Make av_set_pts_info keep previous time base if new one is invalid.

Fixes issue 2475.

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit b3190529dfefe3226302b23e76e16c631cde6649)

3940caad 02/08/2011 11:25 PM Anssi Hannula

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 <>

aad216fd 02/08/2011 11:25 PM Anssi Hannula

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 <>

b3190529 02/06/2011 09:12 PM Reimar Döffinger

Make av_set_pts_info keep previous time base if new one is invalid.

Fixes issue 2475.

Signed-off-by: Ronald S. Bultje <>

4ed68fdf 02/06/2011 07:31 PM Martin Storsjö

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 <>
(cherry picked from commit f124b087eea442b65d809582527dfb5092a3463c)

2d9fd181 02/06/2011 07:31 PM Peter Ross

add ff_index_search_timestamp and ff_add_index_entry

Signed-off-by: Ronald S. Bultje <>
(cherry picked from commit e6fb5a4f78a67ed815e39ba8ac3893fd631b9b1a)

f124b087 02/04/2011 04:29 PM Martin Storsjö

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 <>

e6fb5a4f 02/04/2011 02:50 AM Peter Ross

add ff_index_search_timestamp and ff_add_index_entry

Signed-off-by: Ronald S. Bultje <>

d20d1449 01/26/2011 02:43 AM Diego Elio Pettenò

Make ff_interleave_compare_dts static to utils.c.

Signed-off-by: Janne Grunau <>
(cherry picked from commit 101e1f6ff90c3365bfde05469ae26d2ee7f71f3e)

101e1f6f 01/25/2011 08:48 PM Diego Elio Pettenò

Make ff_interleave_compare_dts static to utils.c.

Signed-off-by: Janne Grunau <>

440d761e 01/11/2011 12:17 PM Stefano Sabatini

Clarify timestamps related error messages in compute_pkt_fields2().

Originally committed as revision 26308 to svn://svn.ffmpeg.org/ffmpeg/trunk

6cbce636 01/06/2011 03:30 AM Daniel Kang

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

6bbdba08 01/06/2011 01:11 AM Stefano Sabatini

Revert previous commit, as it was not meant to be pushed.

Originally committed as revision 26239 to svn://svn.ffmpeg.org/ffmpeg/trunk

7820147e 01/06/2011 01:01 AM Stefano Sabatini

Issue more explicit error messages in compute_pkt_fields2().

Originally committed as revision 26238 to svn://svn.ffmpeg.org/ffmpeg/trunk

81bd4119 01/06/2011 01:01 AM Stefano Sabatini

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...

cf99e4aa 01/02/2011 10:52 AM Anssi Hannula

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

9128ae08 12/27/2010 09:08 AM Nicolas George

Implement av_find_best_stream.

Originally committed as revision 26104 to svn://svn.ffmpeg.org/ffmpeg/trunk

bb62d5c1 12/27/2010 07:46 AM Anton Khirnov

Allow output formats without any streams.

Required for future metadata format.

Originally committed as revision 26100 to svn://svn.ffmpeg.org/ffmpeg/trunk

141de5a9 12/26/2010 01:24 AM Peter Ross

add ff_find_stream_index

Originally committed as revision 26092 to svn://svn.ffmpeg.org/ffmpeg/trunk

9100d4d6 12/20/2010 09:58 AM David Czech

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

118ccae0 12/04/2010 02:46 PM Aurelien Jacobs

add subtitle codec autodetection

Originally committed as revision 25884 to svn://svn.ffmpeg.org/ffmpeg/trunk

581ba2ce 11/25/2010 02:19 AM Baptiste Coudurier

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

6bfc2683 11/21/2010 10:24 AM Reimar Döffinger

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

b3c0fc76 11/16/2010 11:50 PM Aurelien Jacobs

av_find_stream_info(): set subtitle codec time_base

Originally committed as revision 25758 to svn://svn.ffmpeg.org/ffmpeg/trunk

cb2c971d 11/13/2010 01:57 PM Aurelien Jacobs

allow passing subtitles header between decoder and encoder

Originally committed as revision 25745 to svn://svn.ffmpeg.org/ffmpeg/trunk

27323146 11/13/2010 08:55 AM Anton Khirnov

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

5d6e4c16 11/12/2010 11:04 AM Stefano Sabatini

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

d60a9f52 10/16/2010 01:07 PM Anton Khirnov

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

13728334 10/15/2010 06:25 PM Aurelien Jacobs

add FF_API_SYMVER define to disable symver compatibility functions

Originally committed as revision 25491 to svn://svn.ffmpeg.org/ffmpeg/trunk

114c9a59 10/15/2010 02:25 PM Aurelien Jacobs

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

d87a521c 10/15/2010 01:33 PM Aurelien Jacobs

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

88e44314 10/15/2010 12:54 PM Aurelien Jacobs

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