- if (st->codec->codec_id == CODEC_ID_RA_288) {
- int x, y;
-
- for (y = 0; y < ast->sub_packet_h; y++)
- for (x = 0; x < ast->sub_packet_h/2; x++)
- if (get_buffer(pb, ast->pkt.data+x*2*ast->audio_framesize+y*ast->coded_framesize, ast->coded_framesize) <= 0)
- return AVERROR(EIO);
- rm->audio_stream_num = 0;
- rm->audio_pkt_cnt = ast->sub_packet_h * ast->audio_framesize / st->codec->block_align - 1;
- // Release first audio packet
- av_new_packet(pkt, st->codec->block_align);
- memcpy(pkt->data, ast->pkt.data, st->codec->block_align); //FIXME avoid this
- pkt->flags |= PKT_FLAG_KEY; // Mark first packet as keyframe
- pkt->stream_index = 0;
- } else {
- /* just read raw bytes */
- len = RAW_PACKET_SIZE;
- len= av_get_packet(pb, pkt, len);
- pkt->stream_index = 0;
- if (len <= 0) {
- return AVERROR(EIO);
- }
- pkt->size = len;
- }
- rm_ac3_swap_bytes(st, pkt);
+ timestamp = AV_NOPTS_VALUE;
+ len = !ast->audio_framesize ? RAW_PACKET_SIZE :
+ ast->coded_framesize * ast->sub_packet_h / 2;
+ flags = (seq++ == 1) ? 2 : 0;