Guest User

Untitled

a guest
Mar 4th, 2016
12
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c
  2. index c34499c..30a8533 100644
  3. --- a/libavformat/oggparseflac.c
  4. +++ b/libavformat/oggparseflac.c
  5. @@ -61,16 +61,9 @@ flac_header (AVFormatContext * s, int idx)
  6.          st->codecpar->codec_id = AV_CODEC_ID_FLAC;
  7.          st->need_parsing = AVSTREAM_PARSE_HEADERS;
  8.  
  9. -<<<<<<< HEAD
  10. -        if (ff_alloc_extradata(st->codec, FLAC_STREAMINFO_SIZE) < 0)
  11. +        if (ff_alloc_extradata(st->codecpar, FLAC_STREAMINFO_SIZE) < 0)
  12.              return AVERROR(ENOMEM);
  13. -        memcpy(st->codec->extradata, streaminfo_start, st->codec->extradata_size);
  14. -=======
  15. -        st->codecpar->extradata =
  16. -            av_malloc(FLAC_STREAMINFO_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
  17. -        memcpy(st->codecpar->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);
  18. -        st->codecpar->extradata_size = FLAC_STREAMINFO_SIZE;
  19. ->>>>>>> 9200514ad8717c63f82101dc394f4378854325bf
  20. +        memcpy(st->codecpar->extradata, streaminfo_start, st->codecpar->extradata_size);
  21.  
  22.          samplerate = AV_RB24(st->codecpar->extradata + 10) >> 4;
  23.          if (!samplerate)
  24. @@ -89,7 +82,6 @@ old_flac_header (AVFormatContext * s, int idx)
  25.  {
  26.      struct ogg *ogg = s->priv_data;
  27.      AVStream *st = s->streams[idx];
  28. -<<<<<<< HEAD
  29.      struct ogg_stream *os = ogg->streams + idx;
  30.      AVCodecParserContext *parser = av_parser_init(AV_CODEC_ID_FLAC);
  31.      int size;
  32. @@ -98,22 +90,19 @@ old_flac_header (AVFormatContext * s, int idx)
  33.      if (!parser)
  34.          return -1;
  35.  
  36. -    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
  37. -    st->codec->codec_id = AV_CODEC_ID_FLAC;
  38. -=======
  39.      st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
  40.      st->codecpar->codec_id = AV_CODEC_ID_FLAC;
  41. ->>>>>>> 9200514ad8717c63f82101dc394f4378854325bf
  42.  
  43.      parser->flags = PARSER_FLAG_COMPLETE_FRAMES;
  44. -    av_parser_parse2(parser, st->codec,
  45. +    av_parser_parse2(parser, st->internal->avctx,
  46.                       &data, &size, os->buf + os->pstart, os->psize,
  47.                       AV_NOPTS_VALUE, AV_NOPTS_VALUE, -1);
  48.  
  49.      av_parser_close(parser);
  50.  
  51. -    if (st->codec->sample_rate) {
  52. -        avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
  53. +    if (st->internal->avctx->sample_rate) {
  54. +        st->codecpar->sample_rate = st->internal->avctx->sample_rate;
  55. +        avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
  56.          return 0;
  57.      }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×