[FFmpeg-soc] [soc]: r4440 - in concat/libavformat: m3u.c playlist.c playlist.h

Diego Biurrun diego at biurrun.de
Sat Jun 13 13:39:57 CEST 2009


On Sat, Jun 13, 2009 at 02:53:22AM +0200, gkovacs wrote:
> 
> Log:
> removed unnecessary code, should work with same-codec different-format combinations as-is, requires an (in-progress) patch to ffmpeg.c and ffplay.c to handle changing streams during decoding

Please do not use -m for commit messages and break overly long lines.

This commit message is bad, your commit does many things apart from
removing unnecessary code.

Some comments below...

> --- concat/libavformat/m3u.c	Fri Jun 12 21:24:59 2009	(r4439)
> +++ concat/libavformat/m3u.c	Sat Jun 13 02:53:22 2009	(r4440)
> @@ -1,6 +1,6 @@
>  /*
>   * M3U muxer and demuxer

You removed the muxer but failed to update this comment.

>  static int m3u_read_header(AVFormatContext *s,
> -                          AVFormatParameters *ap)
> +                           AVFormatParameters *ap)
>  {
> -    unsigned char *flist[512];
> -    int flist_len;
> -    ByteIOContext *pb;
> -    PlaylistD *playld;
> -    pb = s->pb;
> -    m3u_list_files(pb->buffer, pb->buffer_size, flist, &flist_len);
> -    playld = av_make_playlistd(flist, flist_len);
> +    printf("m3u read header called\n");

You have to get rid of these printfs.

>  static int m3u_read_packet(AVFormatContext *s,
> -                          AVPacket *pkt)
> +                           AVPacket *pkt)

cosmetics

> +//    if (pkt) {
> +//        pkt->stream_index += get_stream_offset(s);
> +//    }

Debugging junk?  Commented-out lines should not litter the code in the
repository, you will have to get rid of them sooner or later anyway.

There is more in other places.

>      if (ret < 0 && playld->pe_curidx < playld->pelist_size - 1)
>      {

This if statement is inconsistently formatted.

> --- concat/libavformat/playlist.c	Fri Jun 12 21:24:59 2009	(r4439)
> +++ concat/libavformat/playlist.c	Sat Jun 13 02:53:22 2009	(r4440)
> @@ -105,63 +86,170 @@ PlaylistD* av_make_playlistd(unsigned ch
>  
> -int playlist_populate_context(PlaylistD *playld, AVFormatContext *s)
> +char* conc_strings(char *string1, char *string2) {

Inconsistent function declaration, please use K&R style, like you do in
other places.

> --- concat/libavformat/playlist.h	Fri Jun 12 21:24:59 2009	(r4439)
> +++ concat/libavformat/playlist.h	Sat Jun 13 02:53:22 2009	(r4440)

This header is missing multiple inclusion guards.

Diego


More information about the FFmpeg-soc mailing list