[FFmpeg-soc] [soc]: r1319 - dirac/libavcodec/dirac.c
marco
subversion at mplayerhq.hu
Sun Sep 9 15:35:26 CEST 2007
Author: marco
Date: Sun Sep 9 15:35:26 2007
New Revision: 1319
Log:
correct the bitstream so it is parsable by the decoder
Modified:
dirac/libavcodec/dirac.c
Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c (original)
+++ dirac/libavcodec/dirac.c Sun Sep 9 15:35:26 2007
@@ -3622,12 +3622,12 @@ static int dirac_encode_frame(DiracConte
av_free(s->refframes[0].halfpel[1]);
av_free(s->refframes[0].halfpel[2]);
s->refcnt = 0;
+ } else {
+ dirac_set_ue_golomb(pb, 0);
}
/* Pack the ME data. */
- if (s->refs == 0) {
- dirac_set_ue_golomb(pb, 0);
- } else {
+ if (s->refs) {
align_put_bits(pb);
if (dirac_pack_prediction_parameters(s))
return -1;
@@ -3703,7 +3703,7 @@ static int encode_frame(AVCodecContext *
s->next_parse_code = 0x09;
} else if (s->next_parse_code == 0x09) {
s->ref[0] = s->refframes[0].frame.display_picture_number;
- dirac_encode_parse_info(s, 0x00);
+ dirac_encode_parse_info(s, 0x09);
dirac_encode_frame(s);
}
More information about the FFmpeg-soc
mailing list