vdr2jpeg-0.1.9-libav9.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- ffm.cpp.old 2013-06-22 20:12:27.972712290 +0200
  2. +++ ffm.cpp 2013-06-22 20:13:33.586709956 +0200
  3. @@ -672,7 +672,7 @@
  4. ost->file_index, ost->index);
  5. return false;
  6. }
  7. - if (avcodec_open(ost->st->codec, codec) < 0) {
  8. + if (avcodec_open2(ost->st->codec, codec, NULL) < 0) {
  9. fprintf(stderr, "Error while opening codec for output stream #%d.%d - maybe incorrect parameters such as bit_rate, rate, width or height\n",
  10. ost->file_index, ost->index);
  11. return false;
  12. @@ -691,7 +691,7 @@
  13. ist->st->codec->codec_id, ist->file_index, ist->index);
  14. return false;
  15. }
  16. - if (avcodec_open(ist->st->codec, codec) < 0) {
  17. + if (avcodec_open2(ist->st->codec, codec, NULL) < 0) {
  18. fprintf(stderr, "Error while opening codec for input stream #%d.%d\n",
  19. ist->file_index, ist->index);
  20. return false;
  21. @@ -937,7 +937,7 @@
  22. /* If not enough info to get the stream parameters, we decode the
  23. first frames to get it. (used in mpeg case for example) */
  24. - ret = av_find_stream_info(ic);
  25. + ret = avformat_find_stream_info(ic, NULL);
  26. if (ret < 0 && verbose >= 0) {
  27. fprintf(stderr, "%s: could not find codec parameters\n", filename);
  28. return false;
  29. @@ -1034,12 +1034,13 @@
  30. AVCodecContext *video_enc;
  31. CodecID codec_id;
  32. - st = av_new_stream(oc, oc->nb_streams);
  33. + st = avformat_new_stream(oc, NULL);
  34. if (!st) {
  35. fprintf(stderr, "Could not alloc stream\n");
  36. return false;
  37. }
  38. - avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
  39. + st->id = oc->nb_streams;
  40. + avcodec_get_context_defaults3(st->codec, NULL);
  41. video_enc = st->codec;
  42. @@ -1204,7 +1205,7 @@
  43. {
  44. av_log_set_level(verbose);
  45. av_register_all();
  46. - avctx_opts= avcodec_alloc_context();
  47. + avctx_opts= avcodec_alloc_context3(NULL);
  48. }
  49. void ffm_deinitalize(void)