[soc]: r4825 - in concat/libavformat: concat.c playlist.h
Author: gkovacs Date: Wed Jul 29 05:06:53 2009 New Revision: 4825 Log: added implicitly declared header, fixed wrong datatype declaration Modified: concat/libavformat/concat.c concat/libavformat/playlist.h Modified: concat/libavformat/concat.c ============================================================================== --- concat/libavformat/concat.c Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/concat.c Wed Jul 29 05:06:53 2009 (r4825) @@ -36,7 +36,7 @@ extern int ff_concatgen_read_packet(AVFo extern int ff_concatgen_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags); -extern int ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); +extern int64_t ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); extern int ff_concatgen_read_close(AVFormatContext *s); Modified: concat/libavformat/playlist.h ============================================================================== --- concat/libavformat/playlist.h Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/playlist.h Wed Jul 29 05:06:53 2009 (r4825) @@ -36,6 +36,7 @@ #include "avformat.h" #include "riff.h" #include <libgen.h> +#include <libavutil/avstring.h> /** @struct PlaylistContext * @brief Represents the playlist and contains PlayElem for each playlist item.
On Wed, Jul 29, 2009 at 05:06:53AM +0200, gkovacs wrote:
Log: added implicitly declared header, fixed wrong datatype declaration
Two separate issues should be fixed in two separate commits.
--- concat/libavformat/concat.c Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/concat.c Wed Jul 29 05:06:53 2009 (r4825) @@ -36,7 +36,7 @@ extern int ff_concatgen_read_packet(AVFo
extern int ff_concatgen_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags);
-extern int ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); +extern int64_t ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit);
extern int ff_concatgen_read_close(AVFormatContext *s);
All these local declarations are exceedingly ugly. They should be in some header file. This would also have avoided the issue you just fixed.
--- concat/libavformat/playlist.h Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/playlist.h Wed Jul 29 05:06:53 2009 (r4825) @@ -36,6 +36,7 @@ #include "avformat.h" #include "riff.h" #include <libgen.h> +#include <libavutil/avstring.h>
Use "" for local headers please. Extra good karma for grouping system headers before local headers. Diego
--- concat/libavformat/concat.c Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/concat.c Wed Jul 29 05:06:53 2009 (r4825) @@ -36,7 +36,7 @@ extern int ff_concatgen_read_packet(AVFo
extern int ff_concatgen_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags);
-extern int ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); +extern int64_t ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit);
extern int ff_concatgen_read_close(AVFormatContext *s);
All these local declarations are exceedingly ugly. They should be in some header file. This would also have avoided the issue you just fixed.
I originally had those in a header file (concatgen.h), but given that none of those functions are of use outside a playlist demuxer, I didn't want those to be polluting the public API. Or is there some other approach I'm missing?
On Tue, Jul 28, 2009 at 11:54:31PM -0700, Geza Kovacs wrote:
--- concat/libavformat/concat.c Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/concat.c Wed Jul 29 05:06:53 2009 (r4825) @@ -36,7 +36,7 @@ extern int ff_concatgen_read_packet(AVFo
extern int ff_concatgen_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags);
-extern int ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); +extern int64_t ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit);
extern int ff_concatgen_read_close(AVFormatContext *s);
All these local declarations are exceedingly ugly. They should be in some header file. This would also have avoided the issue you just fixed.
I originally had those in a header file (concatgen.h), but given that none of those functions are of use outside a playlist demuxer, I didn't want those to be polluting the public API.
Header files are *not* part of public API except if they are installed (see HEADERS var in Makefile). Aurel
On Wed, Jul 29, 2009 at 11:17:13AM +0200, Aurelien Jacobs wrote:
On Tue, Jul 28, 2009 at 11:54:31PM -0700, Geza Kovacs wrote:
--- concat/libavformat/concat.c Wed Jul 29 04:48:38 2009 (r4824) +++ concat/libavformat/concat.c Wed Jul 29 05:06:53 2009 (r4825) @@ -36,7 +36,7 @@ extern int ff_concatgen_read_packet(AVFo
extern int ff_concatgen_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags);
-extern int ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit); +extern int64_t ff_concatgen_read_timestamp(AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit);
extern int ff_concatgen_read_close(AVFormatContext *s);
All these local declarations are exceedingly ugly. They should be in some header file. This would also have avoided the issue you just fixed.
I originally had those in a header file (concatgen.h), but given that none of those functions are of use outside a playlist demuxer, I didn't want those to be polluting the public API.
Header files are *not* part of public API except if they are installed (see HEADERS var in Makefile).
Exactly. If you experience such difficulties, ask here. Diego
participants (4)
-
Aurelien Jacobs -
Diego Biurrun -
Geza Kovacs -
gkovacs