Revision ab5a0175

View differences:

libavformat/avformat.h
242 242
#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */
243 243
#define AVFMT_TS_DISCONT    0x0200 /**< Format allows timestamp discontinuities. */
244 244
#define AVFMT_VARIABLE_FPS  0x0400 /**< Format allows variable fps. */
245
#define AVFMT_NODIMENSIONS  0x0800 /**< Format does not need width/height */
245 246

  
246 247
typedef struct AVOutputFormat {
247 248
    const char *name;
libavformat/img2.c
446 446
    img_write_header,
447 447
    img_write_packet,
448 448
    NULL,
449
    .flags= AVFMT_NOTIMESTAMPS | AVFMT_NOFILE
449
    .flags= AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE
450 450
};
451 451
#endif
452 452
#if CONFIG_IMAGE2PIPE_MUXER
......
460 460
    CODEC_ID_MJPEG,
461 461
    img_write_header,
462 462
    img_write_packet,
463
    .flags= AVFMT_NOTIMESTAMPS
463
    .flags= AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS
464 464
};
465 465
#endif
libavformat/utils.c
2546 2546
                av_log(s, AV_LOG_ERROR, "time base not set\n");
2547 2547
                return -1;
2548 2548
            }
2549
            if(st->codec->width<=0 || st->codec->height<=0){
2549
            if((st->codec->width<=0 || st->codec->height<=0) && !(s->oformat->flags & AVFMT_NODIMENSIONS)){
2550 2550
                av_log(s, AV_LOG_ERROR, "dimensions not set\n");
2551 2551
                return -1;
2552 2552
            }

Also available in: Unified diff