Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: patched-ffmpeg-mt/libavdevice/oss_audio.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Linux audio play and grab interface 2 * Linux audio play and grab interface
3 * Copyright (c) 2000, 2001 Fabrice Bellard 3 * Copyright (c) 2000, 2001 Fabrice Bellard
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt) 244 static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
245 { 245 {
246 AudioData *s = s1->priv_data; 246 AudioData *s = s1->priv_data;
247 int ret, bdelay; 247 int ret, bdelay;
248 int64_t cur_time; 248 int64_t cur_time;
249 struct audio_buf_info abufi; 249 struct audio_buf_info abufi;
250 250
251 if ((ret=av_new_packet(pkt, s->frame_size)) < 0) 251 if ((ret=av_new_packet(pkt, s->frame_size)) < 0)
252 return ret; 252 return ret;
253 253
254 ret = read(s->fd, pkt->data, pkt->size); 254 ret = read(s->fd, pkt->data, pkt->size);
255 if (ret <= 0){ 255 if (ret <= 0){
256 av_free_packet(pkt); 256 av_free_packet(pkt);
257 pkt->size = 0; 257 pkt->size = 0;
258 if (ret<0) return AVERROR(errno); 258 if (ret<0) return AVERROR(errno);
259 else return AVERROR(EOF); 259 else return AVERROR(EOF);
260 } 260 }
261 pkt->size = ret; 261 pkt->size = ret;
262 262
263 /* compute pts of the start of the packet */ 263 /* compute pts of the start of the packet */
264 cur_time = av_gettime(); 264 cur_time = av_gettime();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 #else 320 #else
321 CODEC_ID_PCM_S16LE, 321 CODEC_ID_PCM_S16LE,
322 #endif 322 #endif
323 CODEC_ID_NONE, 323 CODEC_ID_NONE,
324 audio_write_header, 324 audio_write_header,
325 audio_write_packet, 325 audio_write_packet,
326 audio_write_trailer, 326 audio_write_trailer,
327 .flags = AVFMT_NOFILE, 327 .flags = AVFMT_NOFILE,
328 }; 328 };
329 #endif 329 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698