Browse code

Insert a flush packet into the que on init, that way common code between flush and init can be put into the flush handling.

Originally committed as revision 21589 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer authored on 2010/02/01 21:22:12
Showing 1 changed files
... ...
@@ -239,12 +239,15 @@ static AVPacket flush_pkt;
239 239
 
240 240
 static SDL_Surface *screen;
241 241
 
242
+static int packet_queue_put(PacketQueue *q, AVPacket *pkt);
243
+
242 244
 /* packet queue handling */
243 245
 static void packet_queue_init(PacketQueue *q)
244 246
 {
245 247
     memset(q, 0, sizeof(PacketQueue));
246 248
     q->mutex = SDL_CreateMutex();
247 249
     q->cond = SDL_CreateCond();
250
+    packet_queue_put(q, &flush_pkt);
248 251
 }
249 252
 
250 253
 static void packet_queue_flush(PacketQueue *q)