Ticket #2564: patchtiledswf.diff

File patchtiledswf.diff, 1.8 KB (added by Carl Eugen Hoyos, 13 years ago)
  • libavcodec/rawdec.c

    diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
    index f45ff4c..cbfb94e 100644
    a b static av_cold int raw_init_decoder(AVCodecContext *avctx)  
    133133            memset(context->palette->data, 0, AVPALETTE_SIZE);
    134134    }
    135135
    136     context->frame_size = avpicture_get_size(avctx->pix_fmt, avctx->width,
    137                                              avctx->height);
    138136    if ((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
    139137        avctx->pix_fmt == AV_PIX_FMT_PAL8 &&
    140138       (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' ')))
    static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,  
    174172    AVFrame   *frame   = data;
    175173    AVPicture *picture = data;
    176174
     175    context->frame_size = avpicture_get_size(avctx->pix_fmt, avctx->width,
     176                                             avctx->height);
    177177    frame->pict_type        = AV_PICTURE_TYPE_I;
    178178    frame->key_frame        = 1;
    179179    frame->reordered_opaque = avctx->reordered_opaque;
  • libavformat/swfdec.c

    diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
    index 54e0f6d..bdc4305 100644
    a b static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)  
    332332
    333333            for (i = 0; i < s->nb_streams; i++) {
    334334                st = s->streams[i];
    335                 if (st->codec->codec_id == AV_CODEC_ID_RAWVIDEO && st->id == -3)
     335                if (st->codec->codec_id == AV_CODEC_ID_RAWVIDEO && st->id == -3) {
     336                    if (width != st->codec->width || height != st->codec->height)
     337                        ff_add_param_change(pkt, 0, 0, 0, width, height);
    336338                    break;
     339                }
    337340            }
    338341            if (i == s->nb_streams) {
    339342                vst = avformat_new_stream(s, NULL);