[FFmpeg-cvslog] r24875 - trunk/libavformat/a64.c

Stefano Sabatini stefano.sabatini-lala
Mon Aug 23 16:04:25 CEST 2010


On date Monday 2010-08-23 13:47:50 +0200, bindhammer wrote:
> Author: bindhammer
> Date: Mon Aug 23 13:47:50 2010
> New Revision: 24875
> 
> Log:
> Corresponding muxer for the a64 codec
> 
> Added:
>    trunk/libavformat/a64.c
> 
> Added: trunk/libavformat/a64.c
> ==============================================================================
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
[...]
> +#include "libavcodec/avcodec.h"
> +#include "libavcodec/a64enc.h"
> +#include "libavcodec/bytestream.h"
> +#include "avformat.h"
> +
> +static int a64_write_header(struct AVFormatContext *s)
> +{
> +    AVCodecContext *avctx=s->streams[0]->codec;
> +    uint8_t header[5] = {
> +        0x00, //load
> +        0x40, //address
> +        0x00, //mode
> +        0x00, //charset_lifetime (multi only)
> +        0x00  //fps in 50/fps;
> +    };
> +    switch (avctx->codec->id) {
> +    case CODEC_ID_A64_MULTI:
> +        header[2] = 0x00;
> +        header[3] = 4;
> +        header[4] = 2;
> +        break;
> +    case CODEC_ID_A64_MULTI5:
> +        header[2] = 0x01;
> +        header[3] = 4;
> +        header[4] = 3;
> +        break;
> +    default:
> +        return -1;

AVERROR(EINVAL) seems more correct.




More information about the ffmpeg-cvslog mailing list