Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.90 KB | None | 0 0
  1. Index: contrib/ffmpeg/module.defs
  2. ===================================================================
  3. --- contrib/ffmpeg/module.defs  (revision 6840)
  4. +++ contrib/ffmpeg/module.defs  (working copy)
  5. @@ -17,6 +17,7 @@
  6.      --enable-gpl \
  7.      --disable-doc \
  8.      --disable-bsfs \
  9. +    --enable-bsf=aac_adtstoasc \
  10.      --disable-avconv \
  11.      --disable-avplay \
  12.      --disable-avprobe \
  13. Index: libhb/muxavformat.c
  14. ===================================================================
  15. --- libhb/muxavformat.c (revision 6840)
  16. +++ libhb/muxavformat.c (working copy)
  17. @@ -32,6 +32,8 @@
  18.  
  19.      int64_t  prev_chapter_tc;
  20.      int16_t  current_chapter;
  21. +
  22. +    AVBitStreamFilterContext* aac_adtstoasc;
  23.  };
  24.  
  25.  struct hb_mux_object_s
  26. @@ -516,6 +518,9 @@
  27.                  memcpy(priv_data,
  28.                         audio->priv.config.extradata.bytes,
  29.                         audio->priv.config.extradata.length);
  30. +                if (audio->config.out.codec & HB_ACODEC_PASS_FLAG) {
  31. +                    //track->aac_adtstoasc = av_bitstream_filter_init("aac_adtstoasc");
  32. +                }
  33.                  break;
  34.              default:
  35.                  hb_error("muxavformat: Unknown audio codec: %x",
  36. @@ -1206,6 +1211,11 @@
  37.      }
  38.      track->duration = pts + pkt.duration;
  39.  
  40. +    if (track->aac_adtstoasc)
  41. +    {
  42. +        av_bitstream_filter_filter(track->aac_adtstoasc, track->st->codec, NULL, &pkt.data, &pkt.size, pkt.data, pkt.size, 0);
  43. +    }
  44. +
  45.      pkt.stream_index = track->st->index;
  46.      int ret = av_interleaved_write_frame(m->oc, &pkt);
  47.      // Many avformat muxer functions do not check the error status
  48. @@ -1244,6 +1254,10 @@
  49.      for (ii = 0; ii < m->ntracks; ii++)
  50.      {
  51.          avformatMux(m, m->tracks[ii], NULL);
  52. +        if (m->tracks[ii]->aac_adtstoasc)
  53. +        {
  54. +            av_bitstream_filter_close(m->tracks[ii]->aac_adtstoasc);
  55. +        }
  56.      }
  57.  
  58.      if (job->chapter_markers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement