lavc/utils: rename ff_init_buffer_info() pic parameter to frame

The new name is more expressive, given that the frame is not necessarily
a picture but may be an audio frame.
This commit is contained in:
Stefano Sabatini 2012-08-02 13:14:15 +02:00
parent b99381e8b5
commit 44bd69e9b9
2 changed files with 17 additions and 17 deletions

View File

@ -122,7 +122,7 @@ unsigned int avpriv_toupper4(unsigned int x);
/** /**
* does needed setup of pkt_pts/pos and such for (re)get_buffer(); * does needed setup of pkt_pts/pos and such for (re)get_buffer();
*/ */
void ff_init_buffer_info(AVCodecContext *s, AVFrame *pic); void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame);
/** /**
* Remove and free all side data from packet. * Remove and free all side data from packet.

View File

@ -289,31 +289,31 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
*width=FFALIGN(*width, align); *width=FFALIGN(*width, align);
} }
void ff_init_buffer_info(AVCodecContext *s, AVFrame *pic) void ff_init_buffer_info(AVCodecContext *s, AVFrame *frame)
{ {
if (s->pkt) { if (s->pkt) {
pic->pkt_pts = s->pkt->pts; frame->pkt_pts = s->pkt->pts;
pic->pkt_pos = s->pkt->pos; frame->pkt_pos = s->pkt->pos;
pic->pkt_duration = s->pkt->duration; frame->pkt_duration = s->pkt->duration;
} else { } else {
pic->pkt_pts = AV_NOPTS_VALUE; frame->pkt_pts = AV_NOPTS_VALUE;
pic->pkt_pos = -1; frame->pkt_pos = -1;
pic->pkt_duration = 0; frame->pkt_duration = 0;
} }
pic->reordered_opaque= s->reordered_opaque; frame->reordered_opaque = s->reordered_opaque;
switch (s->codec->type) { switch (s->codec->type) {
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
pic->width = s->width; frame->width = s->width;
pic->height = s->height; frame->height = s->height;
pic->format = s->pix_fmt; frame->format = s->pix_fmt;
pic->sample_aspect_ratio = s->sample_aspect_ratio; frame->sample_aspect_ratio = s->sample_aspect_ratio;
break; break;
case AVMEDIA_TYPE_AUDIO: case AVMEDIA_TYPE_AUDIO:
pic->sample_rate = s->sample_rate; frame->sample_rate = s->sample_rate;
pic->format = s->sample_fmt; frame->format = s->sample_fmt;
pic->channel_layout = s->channel_layout; frame->channel_layout = s->channel_layout;
pic->channels = s->channels; frame->channels = s->channels;
break; break;
} }
} }