| Branch: | Revision:

ffmpeg / libavformat / utils.c @ 56a10009

History | View | Annotate | Download (124 KB)

# Date Author Comment
56a10009 04/06/2011 12:10 PM Anton Khirnov

lavf: if id3v2 tag is present and all else fails, guess by file extension

8978feda 04/03/2011 08:46 PM Anton Khirnov

avio: introduce an AVIOContext.seekable field

Use it instead of url_is_streamed and AVIOContext.is_streamed.

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

c70a6a41 03/25/2011 08:58 PM Justin Ruggles

Use audio_service_type to set stream disposition.

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

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

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

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


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


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

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

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

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

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

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

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

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

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

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

avio: rename ByteIOContext to AVIOContext.

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

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

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

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

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


Signed-off-by: Mans Rullgard <>

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

lavf: print stream disposition in dump_stream_format

Signed-off-by: Janne Grunau <>

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

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

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

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

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

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

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

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

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

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

Implement av_find_best_stream.

Originally committed as revision 26104 to svn://

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

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

add ff_find_stream_index

Originally committed as revision 26092 to svn://

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

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

add subtitle codec autodetection

Originally committed as revision 25884 to svn://

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

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

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

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

allow passing subtitles header between decoder and encoder

Originally committed as revision 25745 to svn://

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

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

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

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

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

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

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

198ac67f 10/15/2010 12:45 PM Aurelien Jacobs

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

fd0368e7 10/08/2010 10:01 PM Aurelien Jacobs

move av_find_stream_info() info struct to AVStream to avoid messy (re)allocation

Originally committed as revision 25418 to svn://

e99179de 10/07/2010 07:10 PM Aurelien Jacobs

remove useless local variable

Originally committed as revision 25394 to svn://

3e4318bf 10/07/2010 07:05 PM Aurelien Jacobs

remove useless local allocated start_time array

Originally committed as revision 25393 to svn://

61138c43 10/06/2010 09:43 PM Aurelien Jacobs


Originally committed as revision 25382 to svn://

38aab35f 10/06/2010 08:56 PM Aurelien Jacobs

add new streams API without MAX_STREAMS limit
(disabled until next major bump)

Originally committed as revision 25381 to svn://

feb2440c 10/06/2010 08:52 PM Aurelien Jacobs

dynamically use nb_streams instead of static use of MAX_STREAMS

Originally committed as revision 25380 to svn://

6612d8cf 10/06/2010 08:21 PM Reimar Döffinger

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

eb99f179 10/05/2010 07:33 PM Martin Storsjö

find_info_tag: Make sure the output buffer is null terminated

Originally committed as revision 25353 to svn://

62784e37 10/02/2010 10:18 PM Benjamin Larsson

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

59cb40b9 09/27/2010 10:17 PM Michael Chinen

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

6ed04040 09/26/2010 02:25 PM Michael Niedermayer

Move AVOptions from libavcodec to libavutil

Originally committed as revision 25210 to svn://

b163078f 09/07/2010 09:06 PM Christian d'Heureuse

Fix formatting for negative start times (issue 2139).

Patch by Christian d'Heureuse, chdh inventec ch

Originally committed as revision 25063 to svn://

b004207d 09/05/2010 10:25 PM Aurelien Jacobs

move stream info arrays into a struct to ease future dynamic allocation

Originally committed as revision 25045 to svn://

668338c5 08/24/2010 03:08 PM Måns Rullgård

avformat: free decryption key in av_close_input_stream()

Originally committed as revision 24899 to svn://

f9c399c4 08/19/2010 02:49 PM Martin Storsjö

Make parse_key_value from httpauth a common lavf internal function

Originally committed as revision 24832 to svn://

54036be1 08/18/2010 08:34 PM Aurelien Jacobs

rename LAVF_API_* defines to FF_API_* to clarify that it is not public API

Originally committed as revision 24825 to svn://

dd872bf4 08/17/2010 08:23 PM Aurelien Jacobs

add LAVF_API_OLD_METADATA define to disable the deprecated metadata API

Originally committed as revision 24818 to svn://

d2064fd4 08/12/2010 12:35 AM Baptiste Coudurier

Fix segv when stream copy and validate_tag fails, st->codec->codec is not set

Originally committed as revision 24782 to svn://

ec973f45 08/10/2010 05:27 PM Przemysław Sobala

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

311baee7 08/09/2010 10:05 AM Martin Storsjö

Make hex_to_data a lavf internal function

This is useful for other future RTP depacketizers

Originally committed as revision 24747 to svn://

126b638e 07/26/2010 11:12 PM Stefano Sabatini

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

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

9d3fdf20 07/03/2010 03:15 AM Baptiste Coudurier

Move AVStream->codec_info_nb_frames increment after try_decode_frame

Originally committed as revision 24017 to svn://

ae447836 07/03/2010 03:07 AM Baptiste Coudurier

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

b0a18c2f 06/30/2010 11:01 PM XBMC

Make "invalid dts/pts combination" a debug instead of a warning message.

Patch by XBMC

Originally committed as revision 23919 to svn://

49bd8e4b 06/30/2010 03:38 PM Måns Rullgård

Fix grammar errors in documentation

Originally committed as revision 23904 to svn://

22d78b05 06/28/2010 08:04 AM Eli Friedman

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

f3bfe388 06/27/2010 02:16 PM Måns Rullgård

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

5be5d28c 06/22/2010 08:48 AM Stephen Dredge

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

a955fc5e 06/19/2010 09:56 PM Martin Storsjö

ff_url_join: Don't add any at-char if the auth is an empty string

Originally committed as revision 23650 to svn://

b462d132 06/15/2010 01:26 PM Måns Rullgård

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

7686ab07 06/05/2010 11:13 PM Michael Niedermayer

Fix muxing rgb rawvideo in avi regression.

Originally committed as revision 23500 to svn://

b603ab8d 06/02/2010 10:54 AM Stefano Sabatini

Make the error message issued in case of invalid codec tag more

Originally committed as revision 23423 to svn://

b742a12e 06/01/2010 07:49 PM Michael Niedermayer

Print an error when MAX_STREAMS is reached.

Originally committed as revision 23413 to svn://

a5266a47 05/27/2010 05:11 PM Michael Niedermayer

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

74a6df59 05/26/2010 04:20 AM Alex Converse

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

9bbe9a0d 05/24/2010 04:42 PM Jai Menon

Display a more descriptive log message when probe buffer limit is

Originally committed as revision 23288 to svn://

e1745e2f 05/22/2010 09:52 PM Stefano Sabatini

Make av_write_header() return AVERROR rather than -1 if the
input parameters are not valid.

Originally committed as revision 23253 to svn://

cf5b33d9 05/22/2010 09:52 PM Stefano Sabatini

Store in a dedicated array the format name - codec id - codec type
mapping. Simplify.

Originally committed as revision 23252 to svn://

83c27079 05/22/2010 03:56 PM Stefano Sabatini

Prefer enum CodecID over int in ff_codec_get_tag().

Originally committed as revision 23249 to svn://