"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavformat/rmdec.c" between
libav-12.1.tar.gz and libav-12.2.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

rmdec.c  (libav-12.1):rmdec.c  (libav-12.2)
skipping to change at line 724 skipping to change at line 724
} }
} }
} }
int int
ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb, ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, int len, AVPacket *pkt, AVStream *st, RMStream *ast, int len, AVPacket *pkt,
int *seq, int flags, int64_t timestamp) int *seq, int flags, int64_t timestamp)
{ {
RMDemuxContext *rm = s->priv_data; RMDemuxContext *rm = s->priv_data;
int ret;
if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
rm->current_stream= st->id; rm->current_stream= st->id;
if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq, &timestamp)) if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq, &timestamp))
return -1; //got partial frame return -1; //got partial frame
} else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
if ((ast->deint_id == DEINT_ID_GENR) || if ((ast->deint_id == DEINT_ID_GENR) ||
(ast->deint_id == DEINT_ID_INT4) || (ast->deint_id == DEINT_ID_INT4) ||
(ast->deint_id == DEINT_ID_SIPR)) { (ast->deint_id == DEINT_ID_SIPR)) {
int x; int x;
skipping to change at line 780 skipping to change at line 781
rm->audio_stream_num = st->index; rm->audio_stream_num = st->index;
ast->sub_packet_cnt = (avio_rb16(pb) & 0xf0) >> 4; ast->sub_packet_cnt = (avio_rb16(pb) & 0xf0) >> 4;
if (ast->sub_packet_cnt) { if (ast->sub_packet_cnt) {
for (x = 0; x < ast->sub_packet_cnt; x++) for (x = 0; x < ast->sub_packet_cnt; x++)
ast->sub_packet_lengths[x] = avio_rb16(pb); ast->sub_packet_lengths[x] = avio_rb16(pb);
rm->audio_pkt_cnt = ast->sub_packet_cnt; rm->audio_pkt_cnt = ast->sub_packet_cnt;
ast->audiotimestamp = timestamp; ast->audiotimestamp = timestamp;
} else } else
return -1; return -1;
} else { } else {
av_get_packet(pb, pkt, len); ret = av_get_packet(pb, pkt, len);
if (ret < 0)
return ret;
rm_ac3_swap_bytes(st, pkt); rm_ac3_swap_bytes(st, pkt);
} }
} else } else {
av_get_packet(pb, pkt, len); ret = av_get_packet(pb, pkt, len);
if (ret < 0)
return ret;
}
pkt->stream_index = st->index; pkt->stream_index = st->index;
pkt->pts = timestamp; pkt->pts = timestamp;
if (flags & 2) if (flags & 2)
pkt->flags |= AV_PKT_FLAG_KEY; pkt->flags |= AV_PKT_FLAG_KEY;
return st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ? rm->audio_pkt_cnt : 0; return st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
} }
int int
ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb, ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, AVPacket *pkt) AVStream *st, RMStream *ast, AVPacket *pkt)
{ {
RMDemuxContext *rm = s->priv_data; RMDemuxContext *rm = s->priv_data;
int ret;
assert (rm->audio_pkt_cnt > 0); assert (rm->audio_pkt_cnt > 0);
if (ast->deint_id == DEINT_ID_VBRF || if (ast->deint_id == DEINT_ID_VBRF ||
ast->deint_id == DEINT_ID_VBRS) ast->deint_id == DEINT_ID_VBRS) {
av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm- ret = av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt
>audio_pkt_cnt]); - rm->audio_pkt_cnt]);
if (ret < 0)
return ret;
}
else { else {
int ret = av_new_packet(pkt, st->codecpar->block_align); ret = av_new_packet(pkt, st->codecpar->block_align);
if (ret < 0) if (ret < 0)
return ret; return ret;
memcpy(pkt->data, ast->pkt.data + st->codecpar->block_align * //FIXME av oid this memcpy(pkt->data, ast->pkt.data + st->codecpar->block_align * //FIXME av oid this
(ast->sub_packet_h * ast->audio_framesize / st->codecpar->block_a lign - rm->audio_pkt_cnt), (ast->sub_packet_h * ast->audio_framesize / st->codecpar->block_a lign - rm->audio_pkt_cnt),
st->codecpar->block_align); st->codecpar->block_align);
} }
rm->audio_pkt_cnt--; rm->audio_pkt_cnt--;
if ((pkt->pts = ast->audiotimestamp) != AV_NOPTS_VALUE) { if ((pkt->pts = ast->audiotimestamp) != AV_NOPTS_VALUE) {
ast->audiotimestamp = AV_NOPTS_VALUE; ast->audiotimestamp = AV_NOPTS_VALUE;
pkt->flags = AV_PKT_FLAG_KEY; pkt->flags = AV_PKT_FLAG_KEY;
 End of changes. 6 change blocks. 
7 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)