Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More HLS encoder fixes.

- Offset starting timecode to 1 instead of 0 so libavformat sees it as valid.
- Set extended_data field in audio AVFrame to squelch libavcodec warning.
  • Loading branch information...
commit 2e9333db603fede6c73c4501b52f20d8a1610489 1 parent 3d4467d
Chris Pinkham cpinkham authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 mythtv/libs/libmythtv/avformatwriter.cpp
5 mythtv/libs/libmythtv/avformatwriter.cpp
View
@@ -314,7 +314,7 @@ int AVFormatWriter::WriteVideoFrame(VideoFrame *frame)
}
if (m_startingTimecodeOffset == -1)
- m_startingTimecodeOffset = tc;
+ m_startingTimecodeOffset = tc - 1;
tc -= m_startingTimecodeOffset;
m_pkt->pts = tc * m_videoStream->time_base.den / m_videoStream->time_base.num / 1000;
@@ -372,6 +372,7 @@ int AVFormatWriter::WriteAudioFrame(unsigned char *buf, int fnum, long long &tim
m_audPicture->linesize[0] = m_audioFrameSize;
m_audPicture->nb_samples = m_audioFrameSize;
m_audPicture->format = m_audioStream->codec->sample_fmt;
+ m_audPicture->extended_data = m_audPicture->data;
m_bufferedAudioFrameTimes.push_back(timecode);
@@ -399,7 +400,7 @@ int AVFormatWriter::WriteAudioFrame(unsigned char *buf, int fnum, long long &tim
tc = m_bufferedAudioFrameTimes.takeFirst();
if (m_startingTimecodeOffset == -1)
- m_startingTimecodeOffset = tc;
+ m_startingTimecodeOffset = tc - 1;
tc -= m_startingTimecodeOffset;
if (m_avVideoCodec)
Please sign in to comment.
Something went wrong with that request. Please try again.