[FFmpeg-devel] MPEG Video support in RTP

Luca Barbato lu_zero
Tue Aug 28 16:31:30 CEST 2007


Luca Abeni wrote:
> On Tue, 2007-08-28 at 12:37 +0200, Luca Abeni wrote:
> [...]
>> I admit that putting the beginning of the 9th slice in the first packet
>> is not a good idea (because it forces the second packet to be small)...
>> I'll try to do something better about this.
> 
> Here is an updated patch... Seems to work well both for mpeg1 and mpeg2
> video, and to properly packetize (no uselessy small packets) frames
> composed by multiple slices.
> 

Obviously I messed up adding minimal fixes for the issue... (yesterday I
was busy writing some documentation and wasn't using my laptop those
emails got unread till now)

+        len = FFMIN(max_packet_size - (q - s->buf), size);

q - s->buf == 0

+            while (!done) {
...
+                            done = 1;
...
+                        done = 1;
...
+                    done = 1;

done = 1; vs break;

+    max_packet_size = s->max_payload_size - 4; /* 4 bytes for the
payload header */
+                            len = r - buf1 - 4;
+                            len = r1 - buf1 - 4;

the -4 could be factorized to the end

lu

-- 

Luca Barbato

Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero




More information about the ffmpeg-devel mailing list