Revision dfb400a8

View differences:

libavformat/Makefile
29 29
OBJS-$(CONFIG_AVI_DEMUXER)               += avidec.o riff.o
30 30
OBJS-$(CONFIG_AVI_MUXER)                 += avienc.o riff.o
31 31
OBJS-$(CONFIG_AVISYNTH)                  += avisynth.o
32
OBJS-$(CONFIG_AVM2_MUXER)                += swf.o
32 33
OBJS-$(CONFIG_AVS_DEMUXER)               += avs.o vocdec.o voc.o
33 34
OBJS-$(CONFIG_BETHSOFTVID_DEMUXER)       += bethsoftvid.o
34 35
OBJS-$(CONFIG_C93_DEMUXER)               += c93.o vocdec.o voc.o
libavformat/allformats.c
148 148
    REGISTER_DEMUXER  (SOL, sol);
149 149
    REGISTER_DEMUXER  (STR, str);
150 150
    REGISTER_MUXDEMUX (SWF, swf);
151
    REGISTER_MUXER    (AVM2, avm2);
151 152
    REGISTER_MUXER    (TG2, tg2);
152 153
    REGISTER_MUXER    (TGP, tgp);
153 154
    REGISTER_DEMUXER  (THP, thp);
libavformat/avformat.h
21 21
#ifndef FFMPEG_AVFORMAT_H
22 22
#define FFMPEG_AVFORMAT_H
23 23

  
24
#define LIBAVFORMAT_VERSION_INT ((52<<16)+(4<<8)+0)
25
#define LIBAVFORMAT_VERSION     52.4.0
24
#define LIBAVFORMAT_VERSION_INT ((52<<16)+(5<<8)+0)
25
#define LIBAVFORMAT_VERSION     52.5.0
26 26
#define LIBAVFORMAT_BUILD       LIBAVFORMAT_VERSION_INT
27 27

  
28 28
#define LIBAVFORMAT_IDENT       "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
libavformat/swf.c
40 40
#define TAG_STREAMHEAD2   45
41 41
#define TAG_VIDEOSTREAM   60
42 42
#define TAG_VIDEOFRAME    61
43
#define TAG_FILEATTRIBUTES 69
43 44

  
44 45
#define TAG_LONG         0x100
45 46

  
......
249 250
    PutBitContext p;
250 251
    uint8_t buf1[256];
251 252
    int i, width, height, rate, rate_base;
253
    int is_avm2;
252 254

  
253 255
    swf->audio_in_pos = 0;
254 256
    swf->sound_samples = 0;
......
305 307
        swf->samples_per_frame = (audio_enc->sample_rate * rate_base) / rate;
306 308
    }
307 309

  
310
    is_avm2 = !strcmp("avm2", s->oformat->name);
311

  
308 312
    put_tag(pb, "FWS");
309
    if (video_enc && video_enc->codec_id == CODEC_ID_VP6F) {
313
    if (is_avm2) {
314
        put_byte(pb, 9);
315
    } else if (video_enc && video_enc->codec_id == CODEC_ID_VP6F) {
310 316
        put_byte(pb, 8); /* version (version 8 and above support VP6 codec) */
311 317
    } else if (video_enc && video_enc->codec_id == CODEC_ID_FLV1) {
312 318
        put_byte(pb, 6); /* version (version 6 and above support FLV1 codec) */
......
321 327
    swf->duration_pos = url_ftell(pb);
322 328
    put_le16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / rate_base)); /* frame count */
323 329

  
330
    /* avm2/swf v9 (also v8?) files require a file attribute tag */
331
    if (is_avm2) {
332
        put_swf_tag(s, TAG_FILEATTRIBUTES);
333
        put_le32(pb, 1<<3); /* set ActionScript v3/AVM2 flag */
334
        put_swf_end_tag(s);
335
    }
336

  
324 337
    /* define a shape with the jpeg inside */
325 338
    if (video_enc && (video_enc->codec_id == CODEC_ID_VP6F ||
326 339
                       video_enc->codec_id == CODEC_ID_FLV1)) {
......
787 800
    swf_write_trailer,
788 801
};
789 802
#endif
803
#ifdef CONFIG_AVM2_MUXER
804
AVOutputFormat avm2_muxer = {
805
    "avm2",
806
    "Flash 9 (AVM2) format",
807
    "application/x-shockwave-flash",
808
    "swf",
809
    sizeof(SWFContext),
810
    CODEC_ID_MP3,
811
    CODEC_ID_FLV1,
812
    swf_write_header,
813
    swf_write_packet,
814
    swf_write_trailer,
815
};
816
#endif

Also available in: Unified diff