diff options
author | Johan Bilien <jobi@via.ecp.fr> | 2005-02-02 18:14:59 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-02-02 18:14:59 +0000 |
commit | ebaa7e03154e4bec5cbeb7dc839980c67b64c436 (patch) | |
tree | 022e8217136b2e328e318c03c358e18eef05f5b6 /libavcodec/mpegvideo.c | |
parent | ce4a29c066cddfc180979ed86396812f24337985 (diff) | |
download | ffmpeg-ebaa7e03154e4bec5cbeb7dc839980c67b64c436.tar.gz |
rtp_callback: send number of mb patch by (Johan Bilien {jobi via.ecp fr)
Originally committed as revision 3926 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 45c9e566a0..bca63a1913 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -4724,9 +4724,11 @@ static int encode_thread(AVCodecContext *c, void *arg){ assert(pbBufPtr(&s->pb) == s->ptr_lastgob); } } - - if (s->avctx->rtp_callback) - s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, 0); + + if (s->avctx->rtp_callback){ + int number_mb = (mb_y - s->resync_mb_y)*s->mb_width + mb_x - s->resync_mb_x; + s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, current_packet_size, number_mb); + } switch(s->codec_id){ case CODEC_ID_MPEG4: @@ -5166,10 +5168,11 @@ static int encode_thread(AVCodecContext *c, void *arg){ /* Send the last GOB if RTP */ if (s->avctx->rtp_callback) { + int number_mb = (mb_y - s->resync_mb_y)*s->mb_width - s->resync_mb_x; pdif = pbBufPtr(&s->pb) - s->ptr_lastgob; /* Call the RTP callback to send the last GOB */ emms_c(); - s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, 0); + s->avctx->rtp_callback(s->avctx, s->ptr_lastgob, pdif, number_mb); } return 0; |