Skip to content

Commit

Permalink
dvb/ac3 patches 1, 2, and 3 from Mark Anderson
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.mythtv.org/svn/trunk@5219 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information
Isaac Richards committed Jan 28, 2005
1 parent 6dc73c3 commit 87795f6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
6 changes: 6 additions & 0 deletions mythtv/libs/libavformat/mpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,12 @@ static int mpegps_read_packet(AVFormatContext *s,
st->codec.codec_id = codec_id;
if (codec_id != CODEC_ID_PCM_S16BE)
st->need_parsing = 1;

/* notify the callback of the change in streams */
if (s->streams_changed) {
s->streams_changed(s->stream_change_data);
}

found:
if (startcode >= 0xa0 && startcode <= 0xbf) {
int b1, freq;
Expand Down
5 changes: 1 addition & 4 deletions mythtv/libs/libmythtv/avformatdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,11 +644,8 @@ int AvFormatDecoder::ScanStreams(bool novideo)
{
VERBOSE(VB_IMPORTANT,
QString("AvFormatDecoder: Could not find decoder for "
"codec (%1) aborting.")
"codec (%1), ignoring.")
.arg(enc->codec_id));
av_close_input_file(ic);
ic = NULL;
scanerror = -1;
continue;
}

Expand Down
24 changes: 12 additions & 12 deletions mythtv/libs/libmythtv/dvbdev/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ void send_ipack(ipack *p)
switch (streamid & 0xF8){
case 0x80:
p->count += 4;
p->buf[8] = p->hlength;
p->buf[9] = streamid;
p->buf[10] = 0;
p->buf[11] = (ac3_off >> 8)& 0xFF;
Expand Down Expand Up @@ -473,18 +474,17 @@ static void write_ipack(ipack *p, uint8_t *data, int count)
case PRIV_TS_AC3: /* keep this as default */
default:
{
int ac3_off;
ac3_off = get_ac3info(data, count, &ai,0);
if (ac3_off>=0 && ai.framesize){
p->buf[p->count] = 0x80;
p->buf[p->count+1] = (p->size - p->count
- 4 - ac3_off)/
ai.framesize + 1;
p->buf[p->count+2] = (ac3_off >> 8)& 0xFF;
p->buf[p->count+3] = (ac3_off)& 0xFF;
p->count+=4;

}
/*
* add in a dummy 4 byte audio header
* to match mpeg dvd standard. The values
* will be filled in later (in send_ipack)
* when it has a full packet to search
*/
p->buf[p->count] = 0x80;
p->buf[p->count+1] = 0;
p->buf[p->count+2] = 0;
p->buf[p->count+3] = 0;
p->count+=4;
}
break;
}
Expand Down

0 comments on commit 87795f6

Please sign in to comment.