comparison apiexample.c @ 71:79be2c581c01 libavcodec

changed opendivx to mpeg4
author glantau
date Wed, 15 Aug 2001 13:12:23 +0000
parents 986e461dc072
children 44a1dab0205c
comparison
equal deleted inserted replaced
70:c7767df463f4 71:79be2c581c01
290 } 290 }
291 291
292 /* put default values */ 292 /* put default values */
293 memset(c, 0, sizeof(*c)); 293 memset(c, 0, sizeof(*c));
294 294
295 /* for some codecs, such as msmpeg4 and opendivx, width and height 295 /* for some codecs, such as msmpeg4 and mpeg4, width and height
296 MUST be initialized there because these info are not available 296 MUST be initialized there because these info are not available
297 in the bitstream */ 297 in the bitstream */
298 298
299 /* open it */ 299 /* open it */
300 if (avcodec_open(c, codec) < 0) { 300 if (avcodec_open(c, codec) < 0) {
318 318
319 /* NOTE1: some codecs are stream based (mpegvideo, mpegaudio) 319 /* NOTE1: some codecs are stream based (mpegvideo, mpegaudio)
320 and this is the only method to use them because you cannot 320 and this is the only method to use them because you cannot
321 know the compressed data size before analysing it. 321 know the compressed data size before analysing it.
322 322
323 BUT some other codecs (msmpeg4, opendivx) are inherently 323 BUT some other codecs (msmpeg4, mpeg4) are inherently frame
324 frame based, so you must call them with all the data for 324 based, so you must call them with all the data for one
325 one frame exactly. You must also initialize 'width' and 325 frame exactly. You must also initialize 'width' and
326 'height' before initializing them. */ 326 'height' before initializing them. */
327 327
328 /* NOTE2: some codecs allow the raw parameters (frame size, 328 /* NOTE2: some codecs allow the raw parameters (frame size,
329 sample rate) to be changed at any frame. We handle this, so 329 sample rate) to be changed at any frame. We handle this, so
330 you should also take care of it */ 330 you should also take care of it */