History

Merge commit '59444c76e6d43529a12dbd80b6dd29c6ba4079a9'

* commit '59444c76e6d43529a12dbd80b6dd29c6ba4079a9': avconv: add stream-global side data to the first demuxed packet Conflicts: ffmpeg.c

Michael Niedermayer committed 12 years ago

Commit 82e66602 parents c08e523 59444c72 files · +20 −0Browse files

Unified · Split

2 files
  1. ffmpeg.c +17 −0
  2. ffmpeg.h +3 −0
ffmpeg.c+17−0
@@ -3174,6 +3174,7 @@ static int process_input(int file_index) · 3173 unmodified lines
3174 }3174 }
3175 3175
3176 ist = input_streams[ifile->ist_index + pkt.stream_index];3176 ist = input_streams[ifile->ist_index + pkt.stream_index];
3177 ist->nb_packets++;
3177 if (ist->discard)3178 if (ist->discard)
3178 goto discard_packet;3179 goto discard_packet;
3179 3180
@@ -3224,6 +3225,22 @@ static int process_input(int file_index) · 44 unmodified lines
3224 }3225 }
3225 }3226 }
3226 3227
3228 /* add the stream-global side data to the first packet */
3229 if (ist->nb_packets == 1)
3230 for (i = 0; i < ist->st->nb_side_data; i++) {
3231 AVPacketSideData *src_sd = &ist->st->side_data[i];
3232 uint8_t *dst_data;
3233
3234 if (av_packet_get_side_data(&pkt, src_sd->type, NULL))
3235 continue;
3236
3237 dst_data = av_packet_new_side_data(&pkt, src_sd->type, src_sd->size);
3238 if (!dst_data)
3239 exit_program(1);
3240
3241 memcpy(dst_data, src_sd->data, src_sd->size);
3242 }
3243
3227 if (pkt.dts != AV_NOPTS_VALUE)3244 if (pkt.dts != AV_NOPTS_VALUE)
3228 pkt.dts += av_rescale_q(ifile->ts_offset, AV_TIME_BASE_Q, ist->st->time_base);3245 pkt.dts += av_rescale_q(ifile->ts_offset, AV_TIME_BASE_Q, ist->st->time_base);
3229 if (pkt.pts != AV_NOPTS_VALUE)3246 if (pkt.pts != AV_NOPTS_VALUE)
ffmpeg.h+3−0
@@ -262,6 +262,9 @@ typedef struct InputStream { · 261 unmodified lines
262 int top_field_first;262 int top_field_first;
263 int guess_layout_max;263 int guess_layout_max;
264 264
265 /* number of packets successfully read for this stream */
266 uint64_t nb_packets;
267
265 int resample_height;268 int resample_height;
266 int resample_width;269 int resample_width;
267 int resample_pix_fmt;270 int resample_pix_fmt;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t