Mercurial > libavcodec.hg
comparison wmaenc.c @ 5089:bff60ecc02f9 libavcodec
Use AV_xx throughout libavcodec
author | ramiro |
---|---|
date | Sat, 02 Jun 2007 01:41:07 +0000 |
parents | 99d9dd34903b |
children | 4372aeade5dc |
comparison
equal
deleted
inserted
replaced
5088:8e206208db1f | 5089:bff60ecc02f9 |
---|---|
43 flags1 = 0; | 43 flags1 = 0; |
44 flags2 = 1; | 44 flags2 = 1; |
45 if (avctx->codec->id == CODEC_ID_WMAV1) { | 45 if (avctx->codec->id == CODEC_ID_WMAV1) { |
46 extradata= av_malloc(4); | 46 extradata= av_malloc(4); |
47 avctx->extradata_size= 4; | 47 avctx->extradata_size= 4; |
48 extradata[0] = flags1; | 48 AV_WL16(extradata, flags1); |
49 extradata[1] = flags1>>8; | 49 AV_WL16(extradata+2, flags2); |
50 extradata[2] = flags2; | |
51 extradata[3] = flags2>>8; | |
52 } else if (avctx->codec->id == CODEC_ID_WMAV2) { | 50 } else if (avctx->codec->id == CODEC_ID_WMAV2) { |
53 extradata= av_mallocz(10); | 51 extradata= av_mallocz(10); |
54 avctx->extradata_size= 10; | 52 avctx->extradata_size= 10; |
55 extradata[0] = flags1; | 53 AV_WL32(extradata, flags1); |
56 extradata[1] = flags1>>8; | 54 AV_WL16(extradata+4, flags2); |
57 extradata[2] = flags1>>16; | |
58 extradata[3] = flags1>>24; | |
59 extradata[4] = flags2; | |
60 extradata[5] = flags2>>8; | |
61 }else | 55 }else |
62 assert(0); | 56 assert(0); |
63 avctx->extradata= extradata; | 57 avctx->extradata= extradata; |
64 s->use_exp_vlc = flags2 & 0x0001; | 58 s->use_exp_vlc = flags2 & 0x0001; |
65 s->use_bit_reservoir = flags2 & 0x0002; | 59 s->use_bit_reservoir = flags2 & 0x0002; |