libquicktime-1.2.4-ffmpeg-codecs.patch 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. diff -ruN a/plugins/ffmpeg/audio.c b/plugins/ffmpeg/audio.c
  2. --- a/plugins/ffmpeg/audio.c 2012-03-29 21:44:28.000000000 +0200
  3. +++ b/plugins/ffmpeg/audio.c 2020-02-09 19:08:03.716063846 +0100
  4. @@ -626,7 +626,7 @@
  5. {
  6. /* If the codec is mp3, make sure to decode the very last frame */
  7. - if((codec->avctx->codec_id == CODEC_ID_MP3) &&
  8. + if((codec->avctx->codec_id == AV_CODEC_ID_MP3) &&
  9. (codec->bytes_in_chunk_buffer >= 4))
  10. {
  11. if(!mpa_decode_header(&mph, codec->chunk_buffer, (const mpa_header*)0))
  12. @@ -695,7 +695,7 @@
  13. /* Some really broken mp3 files have the header bytes split across 2 chunks */
  14. - if(codec->avctx->codec_id == CODEC_ID_MP3)
  15. + if(codec->avctx->codec_id == AV_CODEC_ID_MP3)
  16. {
  17. if(codec->bytes_in_chunk_buffer < 4)
  18. {
  19. @@ -806,7 +806,7 @@
  20. if(bytes_decoded < 0)
  21. {
  22. - if(codec->avctx->codec_id == CODEC_ID_MP3)
  23. + if(codec->avctx->codec_id == AV_CODEC_ID_MP3)
  24. {
  25. /* For mp3, bytes_decoded < 0 means, that the frame should be muted */
  26. memset(&codec->sample_buffer[track_map->channels * (codec->sample_buffer_end -
  27. @@ -866,8 +866,8 @@
  28. quicktime_audio_map_t *track_map = &file->atracks[track];
  29. quicktime_ffmpeg_audio_codec_t *codec = track_map->codec->priv;
  30. - if((codec->decoder->id == CODEC_ID_MP2) ||
  31. - (codec->decoder->id == CODEC_ID_MP3))
  32. + if((codec->decoder->id == AV_CODEC_ID_MP2) ||
  33. + (codec->decoder->id == AV_CODEC_ID_MP3))
  34. {
  35. mpa_header h;
  36. uint32_t header;
  37. @@ -909,7 +909,7 @@
  38. else
  39. track_map->ci.bitrate = h.bitrate;
  40. }
  41. - else if(codec->decoder->id == CODEC_ID_AC3)
  42. + else if(codec->decoder->id == AV_CODEC_ID_AC3)
  43. {
  44. a52_header h;
  45. uint8_t * ptr;
  46. @@ -986,7 +986,7 @@
  47. #endif
  48. /* Some codecs need extra stuff */
  49. - if(codec->decoder->id == CODEC_ID_ALAC)
  50. + if(codec->decoder->id == AV_CODEC_ID_ALAC)
  51. {
  52. header = quicktime_wave_get_user_atom(track_map->track, "alac", &header_len);
  53. if(header)
  54. @@ -995,7 +995,7 @@
  55. codec->avctx->extradata_size = header_len;
  56. }
  57. }
  58. - if(codec->decoder->id == CODEC_ID_QDM2)
  59. + if(codec->decoder->id == AV_CODEC_ID_QDM2)
  60. {
  61. header = quicktime_wave_get_user_atom(track_map->track, "QDCA", &header_len);
  62. if(header)
  63. @@ -1495,9 +1495,9 @@
  64. codec_base->decode_audio = lqt_ffmpeg_decode_audio;
  65. codec_base->set_parameter = set_parameter;
  66. - if((decoder->id == CODEC_ID_MP3) || (decoder->id == CODEC_ID_MP2))
  67. + if((decoder->id == AV_CODEC_ID_MP3) || (decoder->id == AV_CODEC_ID_MP2))
  68. codec_base->read_packet = read_packet_mpa;
  69. - else if(decoder->id == CODEC_ID_AC3)
  70. + else if(decoder->id == AV_CODEC_ID_AC3)
  71. {
  72. codec_base->write_packet = write_packet_ac3;
  73. codec_base->read_packet = read_packet_ac3;
  74. diff -ruN a/plugins/ffmpeg/lqt_ffmpeg.c b/plugins/ffmpeg/lqt_ffmpeg.c
  75. --- a/plugins/ffmpeg/lqt_ffmpeg.c 2012-02-15 20:48:30.000000000 +0100
  76. +++ b/plugins/ffmpeg/lqt_ffmpeg.c 2020-02-09 19:07:17.929831925 +0100
  77. @@ -386,7 +386,7 @@
  78. struct CODECIDMAP codecidmap_v[] =
  79. {
  80. {
  81. - .id = CODEC_ID_MPEG1VIDEO,
  82. + .id = AV_CODEC_ID_MPEG1VIDEO,
  83. .index = -1,
  84. .encoder = NULL,
  85. .decoder = NULL,
  86. @@ -397,7 +397,7 @@
  87. .wav_ids = { LQT_WAV_ID_NONE }
  88. },
  89. {
  90. - .id = CODEC_ID_MPEG4,
  91. + .id = AV_CODEC_ID_MPEG4,
  92. .index = -1,
  93. .encoder = NULL,
  94. .decoder = NULL,
  95. @@ -415,7 +415,7 @@
  96. .compression_id = LQT_COMPRESSION_MPEG4_ASP,
  97. },
  98. {
  99. - .id = CODEC_ID_MSMPEG4V1,
  100. + .id = AV_CODEC_ID_MSMPEG4V1,
  101. .index = -1,
  102. .encoder = NULL,
  103. .decoder = NULL,
  104. @@ -426,7 +426,7 @@
  105. .wav_ids = { LQT_WAV_ID_NONE },
  106. },
  107. {
  108. - .id = CODEC_ID_MSMPEG4V2,
  109. + .id = AV_CODEC_ID_MSMPEG4V2,
  110. .index = -1,
  111. .encoder = NULL,
  112. .decoder = NULL,
  113. @@ -437,7 +437,7 @@
  114. .wav_ids = { LQT_WAV_ID_NONE },
  115. },
  116. {
  117. - .id = CODEC_ID_MSMPEG4V3,
  118. + .id = AV_CODEC_ID_MSMPEG4V3,
  119. .index = -1,
  120. .encoder = NULL,
  121. .decoder = NULL,
  122. @@ -453,7 +453,7 @@
  123. .do_encode = 1,
  124. },
  125. {
  126. - .id = CODEC_ID_MSMPEG4V3,
  127. + .id = AV_CODEC_ID_MSMPEG4V3,
  128. .index = -1,
  129. .encoder = NULL,
  130. .decoder = NULL,
  131. @@ -468,7 +468,7 @@
  132. },
  133. #if 0
  134. {
  135. - .id = CODEC_ID_WMV1,
  136. + .id = AV_CODEC_ID_WMV1,
  137. .index = -1,
  138. .encoder = NULL,
  139. .decoder = NULL,
  140. @@ -481,7 +481,7 @@
  141. },
  142. #endif
  143. {
  144. - .id = CODEC_ID_H263,
  145. + .id = AV_CODEC_ID_H263,
  146. .index = -1,
  147. .encoder = NULL,
  148. .decoder = NULL,
  149. @@ -493,7 +493,7 @@
  150. .compatibility_flags = LQT_FILE_QT_OLD | LQT_FILE_QT | LQT_FILE_MP4 | LQT_FILE_3GP,
  151. },
  152. {
  153. - .id = CODEC_ID_H263,
  154. + .id = AV_CODEC_ID_H263,
  155. .index = -1,
  156. .encoder = NULL,
  157. .decoder = NULL,
  158. @@ -508,7 +508,7 @@
  159. .do_encode = 1,
  160. },
  161. {
  162. - .id = CODEC_ID_H264,
  163. + .id = AV_CODEC_ID_H264,
  164. .index = -1,
  165. .encoder = NULL,
  166. .decoder = NULL,
  167. @@ -519,7 +519,7 @@
  168. .wav_ids = { LQT_WAV_ID_NONE },
  169. },
  170. {
  171. - .id = CODEC_ID_H263P,
  172. + .id = AV_CODEC_ID_H263P,
  173. .index = -1,
  174. .encoder = NULL,
  175. .decoder = NULL,
  176. @@ -533,7 +533,7 @@
  177. .do_encode = 1,
  178. },
  179. {
  180. - .id = CODEC_ID_H263I,
  181. + .id = AV_CODEC_ID_H263I,
  182. .index = -1,
  183. .encoder = NULL,
  184. .decoder = NULL,
  185. @@ -544,7 +544,7 @@
  186. .wav_ids = { LQT_WAV_ID_NONE },
  187. },
  188. {
  189. - .id = CODEC_ID_SVQ1,
  190. + .id = AV_CODEC_ID_SVQ1,
  191. .index = -1,
  192. .encoder = NULL,
  193. .decoder = NULL,
  194. @@ -555,7 +555,7 @@
  195. .wav_ids = { LQT_WAV_ID_NONE },
  196. },
  197. {
  198. - .id = CODEC_ID_SVQ3,
  199. + .id = AV_CODEC_ID_SVQ3,
  200. .index = -1,
  201. .encoder = NULL,
  202. .decoder = NULL,
  203. @@ -566,7 +566,7 @@
  204. .wav_ids = { LQT_WAV_ID_NONE },
  205. },
  206. {
  207. - .id = CODEC_ID_MJPEG,
  208. + .id = AV_CODEC_ID_MJPEG,
  209. .index = -1,
  210. .encoder = NULL,
  211. .decoder = NULL,
  212. @@ -580,7 +580,7 @@
  213. .do_encode = 1,
  214. },
  215. {
  216. - .id = CODEC_ID_MJPEGB,
  217. + .id = AV_CODEC_ID_MJPEGB,
  218. .index = -1,
  219. .encoder = NULL,
  220. .decoder = NULL,
  221. @@ -594,7 +594,7 @@
  222. },
  223. #if LIBAVCODEC_BUILD >= 3346688
  224. {
  225. - .id = CODEC_ID_TARGA,
  226. + .id = AV_CODEC_ID_TARGA,
  227. .index = -1,
  228. .encoder = NULL,
  229. .decoder = NULL,
  230. @@ -606,7 +606,7 @@
  231. #endif
  232. #if LIBAVCODEC_BUILD >= 3347456
  233. {
  234. - .id = CODEC_ID_TIFF,
  235. + .id = AV_CODEC_ID_TIFF,
  236. .index = -1,
  237. .encoder = NULL,
  238. .decoder = NULL,
  239. @@ -617,7 +617,7 @@
  240. },
  241. #endif
  242. {
  243. - .id = CODEC_ID_8BPS,
  244. + .id = AV_CODEC_ID_8BPS,
  245. .index = -1,
  246. .encoder = NULL,
  247. .decoder = NULL,
  248. @@ -627,7 +627,7 @@
  249. .wav_ids = { LQT_WAV_ID_NONE },
  250. },
  251. {
  252. - .id = CODEC_ID_INDEO3,
  253. + .id = AV_CODEC_ID_INDEO3,
  254. .index = -1,
  255. .encoder = NULL,
  256. .decoder = NULL,
  257. @@ -638,7 +638,7 @@
  258. .wav_ids = { LQT_WAV_ID_NONE },
  259. },
  260. {
  261. - .id = CODEC_ID_RPZA,
  262. + .id = AV_CODEC_ID_RPZA,
  263. .index = -1,
  264. .encoder = NULL,
  265. .decoder = NULL,
  266. @@ -648,7 +648,7 @@
  267. .wav_ids = { LQT_WAV_ID_NONE },
  268. },
  269. {
  270. - .id = CODEC_ID_SMC,
  271. + .id = AV_CODEC_ID_SMC,
  272. .index = -1,
  273. .encoder = NULL,
  274. .decoder = NULL,
  275. @@ -658,7 +658,7 @@
  276. .wav_ids = { LQT_WAV_ID_NONE },
  277. },
  278. {
  279. - .id = CODEC_ID_CINEPAK,
  280. + .id = AV_CODEC_ID_CINEPAK,
  281. .index = -1,
  282. .encoder = NULL,
  283. .decoder = NULL,
  284. @@ -669,7 +669,7 @@
  285. .wav_ids = { LQT_WAV_ID_NONE },
  286. },
  287. {
  288. - .id = CODEC_ID_CYUV,
  289. + .id = AV_CODEC_ID_CYUV,
  290. .index = -1,
  291. .encoder = NULL,
  292. .decoder = NULL,
  293. @@ -680,7 +680,7 @@
  294. .wav_ids = { LQT_WAV_ID_NONE },
  295. },
  296. {
  297. - .id = CODEC_ID_QTRLE,
  298. + .id = AV_CODEC_ID_QTRLE,
  299. .index = -1,
  300. .encoder = NULL,
  301. .decoder = NULL,
  302. @@ -693,7 +693,7 @@
  303. .encoding_colormodels = (int[]){ BC_RGB888, BC_RGBA8888, LQT_COLORMODEL_NONE },
  304. },
  305. {
  306. - .id = CODEC_ID_MSRLE,
  307. + .id = AV_CODEC_ID_MSRLE,
  308. .index = -1,
  309. .encoder = NULL,
  310. .decoder = NULL,
  311. @@ -703,7 +703,7 @@
  312. .wav_ids = { LQT_WAV_ID_NONE },
  313. },
  314. {
  315. - .id = CODEC_ID_DVVIDEO,
  316. + .id = AV_CODEC_ID_DVVIDEO,
  317. .index = -1,
  318. .encoder = NULL,
  319. .decoder = NULL,
  320. @@ -719,7 +719,7 @@
  321. .image_sizes = image_sizes_dv,
  322. },
  323. {
  324. - .id = CODEC_ID_DVVIDEO,
  325. + .id = AV_CODEC_ID_DVVIDEO,
  326. .index = -1,
  327. .encoder = NULL,
  328. .decoder = NULL,
  329. @@ -735,7 +735,7 @@
  330. .image_sizes = image_sizes_dv,
  331. },
  332. {
  333. - .id = CODEC_ID_DVVIDEO,
  334. + .id = AV_CODEC_ID_DVVIDEO,
  335. .index = -1,
  336. .encoder = NULL,
  337. .decoder = NULL,
  338. @@ -751,7 +751,7 @@
  339. },
  340. /* DVCPRO HD (decoding only for now) */
  341. {
  342. - .id = CODEC_ID_DVVIDEO,
  343. + .id = AV_CODEC_ID_DVVIDEO,
  344. .index = -1,
  345. .encoder = NULL,
  346. .decoder = NULL,
  347. @@ -772,7 +772,7 @@
  348. // .do_encode = 1
  349. },
  350. {
  351. - .id = CODEC_ID_FFVHUFF,
  352. + .id = AV_CODEC_ID_FFVHUFF,
  353. .index = -1,
  354. .encoder = NULL,
  355. .decoder = NULL,
  356. @@ -785,7 +785,7 @@
  357. .do_encode = 1
  358. },
  359. {
  360. - .id = CODEC_ID_FFV1,
  361. + .id = AV_CODEC_ID_FFV1,
  362. .index = -1,
  363. .encoder = NULL,
  364. .decoder = NULL,
  365. @@ -801,7 +801,7 @@
  366. },
  367. #if LIBAVCODEC_BUILD >= 3352576
  368. {
  369. - .id = CODEC_ID_DNXHD,
  370. + .id = AV_CODEC_ID_DNXHD,
  371. .index = -1,
  372. .encoder = NULL,
  373. .decoder = NULL,
  374. @@ -817,7 +817,7 @@
  375. },
  376. #endif
  377. {
  378. - .id = CODEC_ID_MPEG2VIDEO,
  379. + .id = AV_CODEC_ID_MPEG2VIDEO,
  380. .index = -1,
  381. .encoder = NULL,
  382. .decoder = NULL,
  383. @@ -839,7 +839,7 @@
  384. struct CODECIDMAP codecidmap_a[] =
  385. {
  386. {
  387. - .id = CODEC_ID_MP3,
  388. + .id = AV_CODEC_ID_MP3,
  389. .index = -1,
  390. .encoder = NULL,
  391. .decoder = NULL,
  392. @@ -851,7 +851,7 @@
  393. .wav_ids = { 0x50, 0x55, LQT_WAV_ID_NONE },
  394. },
  395. {
  396. - .id = CODEC_ID_MP2,
  397. + .id = AV_CODEC_ID_MP2,
  398. .index = -1,
  399. .encoder = NULL,
  400. .decoder = NULL,
  401. @@ -866,7 +866,7 @@
  402. .compression_id = LQT_COMPRESSION_MP2,
  403. },
  404. {
  405. - .id = CODEC_ID_AC3,
  406. + .id = AV_CODEC_ID_AC3,
  407. .index = -1,
  408. .encoder = NULL,
  409. .decoder = NULL,
  410. @@ -881,7 +881,7 @@
  411. .compression_id = LQT_COMPRESSION_AC3,
  412. },
  413. {
  414. - .id = CODEC_ID_QDM2,
  415. + .id = AV_CODEC_ID_QDM2,
  416. .index = -1,
  417. .encoder = NULL,
  418. .decoder = NULL,
  419. @@ -896,7 +896,7 @@
  420. #if 1
  421. /* Doesn't work as long as audio chunks are not split into VBR "Samples" */
  422. {
  423. - .id = CODEC_ID_ALAC,
  424. + .id = AV_CODEC_ID_ALAC,
  425. .index = -1,
  426. .encoder = NULL,
  427. .decoder = NULL,
  428. @@ -909,7 +909,7 @@
  429. #if 1
  430. /* Sounds ugly */
  431. {
  432. - .id = CODEC_ID_ADPCM_MS,
  433. + .id = AV_CODEC_ID_ADPCM_MS,
  434. .index = -1,
  435. .encoder = NULL,
  436. .decoder = NULL,
  437. @@ -922,7 +922,7 @@
  438. #if 1
  439. /* Sounds ugly */
  440. {
  441. - .id = CODEC_ID_ADPCM_IMA_WAV,
  442. + .id = AV_CODEC_ID_ADPCM_IMA_WAV,
  443. .index = -1,
  444. .encoder = NULL,
  445. .decoder = NULL,
  446. diff -ruN a/plugins/ffmpeg/video.c b/plugins/ffmpeg/video.c
  447. --- a/plugins/ffmpeg/video.c 2012-02-25 20:46:56.000000000 +0100
  448. +++ b/plugins/ffmpeg/video.c 2020-02-09 19:07:44.399580606 +0100
  449. @@ -400,7 +400,7 @@
  450. codec->reinterpret_pix_fmt = codec->avctx->pix_fmt;
  451. /* First we try codec-specific colormodel matching. */
  452. - if(codec->decoder->id == CODEC_ID_DNXHD)
  453. + if(codec->decoder->id == AV_CODEC_ID_DNXHD)
  454. {
  455. /* FFMpeg supports PIX_FMT_YUV422P and PIX_FMT_YUV422P10 for DNxHD, which
  456. we sometimes interpret as PIX_FMT_YUVJ422P and PIX_FMT_YUVJ422P10. */
  457. @@ -438,7 +438,7 @@
  458. quicktime_ffmpeg_video_codec_t *codec = vtrack->codec->priv;
  459. codec->avctx->pix_fmt = lqt_ffmpeg_get_ffmpeg_colormodel(vtrack->stream_cmodel);
  460. - if (codec->encoder->id == CODEC_ID_DNXHD)
  461. + if (codec->encoder->id == AV_CODEC_ID_DNXHD)
  462. {
  463. /* FFMpeg's DNxHD encoder only supports PIX_FMT_YUV422P and PIX_FMT_YUV422P10
  464. and doesn't know anything about PIX_FMT_YUVJ422P and PIX_FMT_YUVJ422P10
  465. @@ -728,13 +728,13 @@
  466. /* Set extradata: It's done differently for each codec */
  467. - if(codec->decoder->id == CODEC_ID_SVQ3)
  468. + if(codec->decoder->id == AV_CODEC_ID_SVQ3)
  469. {
  470. extradata = trak->mdia.minf.stbl.stsd.table[0].table_raw + 4;
  471. extradata_size = trak->mdia.minf.stbl.stsd.table[0].table_raw_size - 4;
  472. }
  473. - else if(codec->decoder->id == CODEC_ID_H264)
  474. + else if(codec->decoder->id == AV_CODEC_ID_H264)
  475. {
  476. user_atom = quicktime_stsd_get_user_atom(trak, "avcC", &user_atom_len);
  477. @@ -753,7 +753,7 @@
  478. }
  479. }
  480. - else if(codec->decoder->id == CODEC_ID_MPEG4)
  481. + else if(codec->decoder->id == AV_CODEC_ID_MPEG4)
  482. {
  483. if(trak->mdia.minf.stbl.stsd.table[0].has_esds)
  484. {
  485. @@ -947,15 +947,15 @@
  486. }
  487. #endif
  488. }
  489. - if(codec->decoder->id == CODEC_ID_DVVIDEO)
  490. + if(codec->decoder->id == AV_CODEC_ID_DVVIDEO)
  491. {
  492. if(vtrack->stream_cmodel == BC_YUV420P)
  493. vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_DVPAL;
  494. vtrack->interlace_mode = LQT_INTERLACE_BOTTOM_FIRST;
  495. vtrack->ci.id = LQT_COMPRESSION_DV;
  496. }
  497. - else if((codec->decoder->id == CODEC_ID_MPEG4) ||
  498. - (codec->decoder->id == CODEC_ID_H264))
  499. + else if((codec->decoder->id == AV_CODEC_ID_MPEG4) ||
  500. + (codec->decoder->id == AV_CODEC_ID_H264))
  501. {
  502. if(vtrack->stream_cmodel == BC_YUV420P)
  503. vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_MPEG2;
  504. @@ -1299,13 +1299,13 @@
  505. {
  506. if(vtrack->stream_cmodel == BC_YUV420P)
  507. {
  508. - if(codec->encoder->id == CODEC_ID_MPEG4)
  509. + if(codec->encoder->id == AV_CODEC_ID_MPEG4)
  510. {
  511. vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_MPEG2;
  512. /* enable interlaced encoding */
  513. vtrack->interlace_mode = LQT_INTERLACE_NONE;
  514. }
  515. - else if(codec->encoder->id == CODEC_ID_DVVIDEO)
  516. + else if(codec->encoder->id == AV_CODEC_ID_DVVIDEO)
  517. {
  518. vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_DVPAL;
  519. }
  520. @@ -1340,7 +1340,7 @@
  521. codec->avctx->sample_aspect_ratio.num = pixel_width;
  522. codec->avctx->sample_aspect_ratio.den = pixel_height;
  523. /* Use global headers for mp4v */
  524. - if(codec->encoder->id == CODEC_ID_MPEG4)
  525. + if(codec->encoder->id == AV_CODEC_ID_MPEG4)
  526. {
  527. if(!(file->file_type & (LQT_FILE_AVI|LQT_FILE_AVI_ODML)))
  528. {
  529. @@ -1364,12 +1364,12 @@
  530. }
  531. #endif
  532. }
  533. - else if((codec->encoder->id == CODEC_ID_MSMPEG4V3) && (trak->strl) &&
  534. + else if((codec->encoder->id == AV_CODEC_ID_MSMPEG4V3) && (trak->strl) &&
  535. !strncmp(trak->strl->strf.bh.biCompression, "DIV3", 4))
  536. {
  537. strncpy(trak->strl->strh.fccHandler, "div3", 4);
  538. }
  539. - else if((codec->encoder->id == CODEC_ID_H263) &&
  540. + else if((codec->encoder->id == AV_CODEC_ID_H263) &&
  541. (file->file_type & (LQT_FILE_MP4|LQT_FILE_3GP)))
  542. {
  543. uint8_t d263_data[] =
  544. @@ -1383,7 +1383,7 @@
  545. strncpy(trak->mdia.minf.stbl.stsd.table[0].format,
  546. "s263", 4);
  547. }
  548. - else if(codec->encoder->id == CODEC_ID_FFVHUFF)
  549. + else if(codec->encoder->id == AV_CODEC_ID_FFVHUFF)
  550. {
  551. if(!(file->file_type & (LQT_FILE_AVI|LQT_FILE_AVI_ODML)))
  552. {
  553. @@ -1391,7 +1391,7 @@
  554. codec->write_global_header = 1;
  555. }
  556. }
  557. - else if(codec->encoder->id == CODEC_ID_QTRLE)
  558. + else if(codec->encoder->id == AV_CODEC_ID_QTRLE)
  559. {
  560. if(vtrack->stream_cmodel == BC_RGBA8888)
  561. {
  562. @@ -1402,11 +1402,11 @@
  563. vtrack->track->mdia.minf.stbl.stsd.table[0].depth = 32;
  564. }
  565. }
  566. - else if(codec->encoder->id == CODEC_ID_DVVIDEO)
  567. + else if(codec->encoder->id == AV_CODEC_ID_DVVIDEO)
  568. {
  569. set_dv_fourcc(width, height, vtrack->stream_cmodel, trak);
  570. }
  571. - else if(codec->encoder->id == CODEC_ID_DNXHD)
  572. + else if(codec->encoder->id == AV_CODEC_ID_DNXHD)
  573. {
  574. if(vtrack->interlace_mode != LQT_INTERLACE_NONE)
  575. {
  576. @@ -1558,12 +1558,12 @@
  577. #endif
  578. - if(!was_initialized && codec->encoder->id == CODEC_ID_DNXHD)
  579. + if(!was_initialized && codec->encoder->id == AV_CODEC_ID_DNXHD)
  580. setup_avid_atoms(file, vtrack, codec->buffer, bytes_encoded);
  581. if(bytes_encoded)
  582. {
  583. - if (pts == AV_NOPTS_VALUE || (codec->encoder->id == CODEC_ID_DNXHD && pts == 0))
  584. + if (pts == AV_NOPTS_VALUE || (codec->encoder->id == AV_CODEC_ID_DNXHD && pts == 0))
  585. {
  586. /* Some codecs don't bother generating presentation timestamps.
  587. FFMpeg's DNxHD encoder doesn't even bother to set it to AV_NOPTS_VALUE. */
  588. @@ -1590,13 +1590,13 @@
  589. if(codec->write_global_header && !codec->global_header_written)
  590. {
  591. - if(codec->encoder->id == CODEC_ID_FFVHUFF)
  592. + if(codec->encoder->id == AV_CODEC_ID_FFVHUFF)
  593. {
  594. quicktime_user_atoms_add_atom(&trak->mdia.minf.stbl.stsd.table[0].user_atoms,
  595. "glbl",
  596. codec->avctx->extradata, codec->avctx->extradata_size );
  597. }
  598. - else if(codec->encoder->id == CODEC_ID_MPEG4)
  599. + else if(codec->encoder->id == AV_CODEC_ID_MPEG4)
  600. {
  601. int advanced = 0;
  602. if(codec->avctx->max_b_frames ||
  603. @@ -1903,18 +1903,18 @@
  604. codec_base->encode_video = lqt_ffmpeg_encode_video;
  605. codec_base->set_pass = set_pass_ffmpeg;
  606. - if(encoder->id == CODEC_ID_MPEG4)
  607. + if(encoder->id == AV_CODEC_ID_MPEG4)
  608. {
  609. codec_base->writes_compressed = writes_compressed_mpeg4;
  610. codec_base->init_compressed = init_compressed_mpeg4;
  611. codec_base->write_packet = write_packet_mpeg4;
  612. }
  613. - else if(encoder->id == CODEC_ID_MPEG2VIDEO)
  614. + else if(encoder->id == AV_CODEC_ID_MPEG2VIDEO)
  615. {
  616. codec_base->writes_compressed = writes_compressed_imx;
  617. codec_base->init_compressed = init_compressed_imx;
  618. }
  619. - else if(encoder->id == CODEC_ID_DVVIDEO)
  620. + else if(encoder->id == AV_CODEC_ID_DVVIDEO)
  621. {
  622. codec_base->init_compressed = init_compressed_dv;
  623. }
  624. @@ -1922,7 +1922,7 @@
  625. }
  626. if(decoder)
  627. {
  628. - if(decoder->id == CODEC_ID_H264)
  629. + if(decoder->id == AV_CODEC_ID_H264)
  630. codec_base->read_packet = read_packet_h264;
  631. codec_base->decode_video = lqt_ffmpeg_decode_video;
  632. }